-
Notifications
You must be signed in to change notification settings - Fork 843
ThreatsDataViews: Improve responsiveness #40670
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
Merged
dkmyta
merged 11 commits into
add/protect/core
from
update/components/threats-data-views-responsiveness
Jan 14, 2025
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
09991b1
Init project branch
nateweller 9aa31c3
Init project branch
nateweller 31c6f81
Improve component responsiveness
dkmyta 2f73aa8
Init project branch
nateweller eadeae6
Fix merge conflict
nateweller ebe19c3
Simplify, and only default to list view in mobile
dkmyta cc1e0e9
Fix spacing
dkmyta 79fbdcc
Minor adjustments to initialization of defaultLayouts, remove memo
nateweller 2494779
Remove style overrides on core component
nateweller 009f5ef
Rebase, fix conflicts
dkmyta d63c91f
Reapply min-width for ScanToggleGroupControl
dkmyta 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
Improve component responsiveness
- Loading branch information
commit 31c6f816f772c350fd20e9eee102bd3be554a003
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is it necessary to prevent mobile users from accessing the table layout like this? It would be nice if we could default the view to list on mobile, but still keep it accessible.
Then we would only need to worry about setting the list vs table layout on first render:
Assuming isSm works out of the box without a re-render. Otherwise we could use the
windowdirectly.Anyways, all IMO.
Uh oh!
There was an error while loading. Please reload this page.
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.
Ah my apologies, I must have misunderstood - I was under the impression we wanted to force list view but defaulting and allowing users to switch to table view makes sense to me, will adjust 👍🏻
Uh oh!
There was an error while loading. Please reload this page.
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.
@nateweller Out of curiosity, ideally how would you expect this function? Using just
useBreakpointMatchmight be fine, it does require a re-render but maybe thats not an issue. For instance, if I am in table view in full screen and shrink my screen to the trigger point, would I really want the UI to update to list view (and vice-versa). Maybe its okay just have the default on re-render which strictly apply to mobile users. Happy to look in to the window approach, just thought I'd run it by you first. Here's the first take - 2f5e469Also noting that with the addition of the extra settings toggle in the header, things are now a little squished:

What do you think if we adding alternate styling/content for mobile for the

ToggleGroupControl? Perhaps:Noting that we may need to take the window approach if we go that route.