Skip to content
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

feat(dashboards): Dashboards landing page layout toggle #80790

Merged
merged 5 commits into from
Nov 15, 2024

Conversation

nikkikapadia
Copy link
Member

@nikkikapadia nikkikapadia commented Nov 14, 2024

Adds a toggle to change the dashboards layout from grid to table. This is under feature flag and available to only me right now (since there is no functionality to the toggle as of yet). Actual table layout will be implemented in further PRs.

image

ALSO I am aware that the icon for grid right now is the dashboards icon, Vasudha is working on getting the proper icon for the grid.

@nikkikapadia nikkikapadia changed the title feat(dashboards): Dashboards layout toggle feat(dashboards): Dashboards landing pagelayout toggle Nov 14, 2024
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 14, 2024
@nikkikapadia nikkikapadia changed the title feat(dashboards): Dashboards landing pagelayout toggle feat(dashboards): Dashboards landing page layout toggle Nov 14, 2024
@nikkikapadia nikkikapadia marked this pull request as ready for review November 15, 2024 14:36
@nikkikapadia nikkikapadia requested a review from a team as a code owner November 15, 2024 14:36
Copy link
Member

@narsaynorath narsaynorath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments but looks good

const FEATURES = [
'global-views',
'dashboards-basic',
'dashboards-edit',
'discover-query',
];

const LAYOUT_KEY = 'dashboards-overview-layout';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just export this from the other file?

Comment on lines 79 to 81
return dashboardsLayout === 'grid' || dashboardsLayout === 'list'
? dashboardsLayout
: 'grid';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should put 'grid' and 'list' in constants at the top of the page to reuse them everywhere instead of dealing with strings

onChange={setDashboardsLayout}
size="md"
value={dashboardsLayout}
aria-label="Layout Control"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, but I think we should wrap aria-labels with t() because they're user-facing and should also match the user's language

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooo yes good catch

@nikkikapadia nikkikapadia merged commit e08e9d0 into master Nov 15, 2024
43 checks passed
@nikkikapadia nikkikapadia deleted the nikki/feat/dashboards-table-view branch November 15, 2024 15:23
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants