-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upcoming: [DI-20929] - Added applied filters view in CloudPulse #11354
Merged
coliu-akamai
merged 16 commits into
linode:develop
from
nikhagra-akamai:features/applied_filters
Dec 9, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
726bddc
upcoming: [DI-20929] - Added labels parameter to global filter changeβ¦
nikhagra-akamai fab859a
upcoming: [DI-20929] - Added cloudpulse applied filter
nikhagra-akamai 24af9e8
upcoming: [DI-20929] - Added test cases
nikhagra-akamai 33e78a8
upcoming: [DI-20929] - updated failing test cases
nikhagra-akamai 2ec9bd6
upcoming: [DI-22221] - Fixed console error
nikhagra-akamai 7177bc5
upcoming: [DI-20929] - Added changeset
nikhagra-akamai 265cb62
upcoming: [DI-20929] - Updated changeset
nikhagra-akamai 2bf49af
upcoming: [DI-20929] - Updated import libraries
nikhagra-akamai 755ad00
upcomign: [DI-20929] - Updated types
nikhagra-akamai 7cc5507
upcomign: [DI-20929] - Updated types
nikhagra-akamai 704296a
Merge branch 'develop' of github.com:linode/manager into features/appβ¦
nikhagra-akamai 48c186b
upcoming: [DI-20929] - Updated styles for dark theme
nikhagra-akamai af2f296
upcoming: [DI-20929] - Updated styling
nikhagra-akamai be56566
upcoming: [DI-20929
nikhagra-akamai d67c01f
upcoming: [DI-20929] - updated function order
nikhagra-akamai 1f79afa
upcoming: [DI-20929] - Improve code readability
nikhagra-akamai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-11354-upcoming-features-1733237771685.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Add `CloudPulseAppliedFilter` and `CloudPulseAppliedFilterRenderer` components, update filter change handler function to add another parameter `label` ([#11354](https://github.com/linode/manager/pull/11354)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/manager/src/features/CloudPulse/shared/CloudPulseAppliedFilter.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
|
||
import { renderWithTheme } from 'src/utilities/testHelpers'; | ||
|
||
import { CloudPulseAppliedFilter } from './CloudPulseAppliedFilter'; | ||
import { CloudPulseAppliedFilterRenderer } from './CloudPulseAppliedFilterRenderer'; | ||
|
||
const data = { | ||
region: ['us-east'], | ||
resource: ['res1', 'res2'], | ||
}; | ||
|
||
const testId = 'applied-filter'; | ||
|
||
describe('CloudPulse Applied Filter', () => { | ||
it('should render applied filter component', () => { | ||
const { getByTestId } = renderWithTheme( | ||
<CloudPulseAppliedFilter filters={data} /> | ||
); | ||
expect(getByTestId(testId)).toBeInTheDocument(); | ||
}); | ||
|
||
it('should render the applied filter key & values', () => { | ||
const { getByTestId } = renderWithTheme( | ||
<CloudPulseAppliedFilter filters={data} /> | ||
); | ||
expect(getByTestId(testId)).toHaveTextContent('region'); | ||
expect(getByTestId(testId)).toHaveTextContent('res1'); | ||
expect(getByTestId(testId)).not.toHaveTextContent('resources'); | ||
}); | ||
|
||
it('should not render the applied filter component', () => { | ||
const { queryByTestId } = renderWithTheme( | ||
<CloudPulseAppliedFilterRenderer filters={{}} serviceType="abc" /> | ||
); | ||
|
||
expect(queryByTestId(testId)).toBe(null); | ||
}); | ||
}); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: I wonder if we could avoid importing this
useTheme
and instead access/use the theme directly in the styles, like thissx={(theme)=> ({})}