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

[Dashboard] Add maxWidth 's' to Panel Settings flyouts and 'm' to drilldown widths not already specified in dashboard #189009

Merged
merged 10 commits into from
Jul 27, 2024

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented Jul 23, 2024

Summary

Closes #163981

The Dashboard and Panel Settings Flyouts already seem to be fixed but the Controls Settings Flyout did not specify the maxWidth.

The drilldown (manage and create) flyouts did not have a maxWidth specified but based on main, it seems to match medium. To avoid any unclearness, I have added the maxWidth property to the flyout.

The edit and create drilldowns that didn't have specified maxWidths can be toggled to each other so they should be the same. I think there can be a little bit of a debate on which makes the most sense. Although there is some white space to the right of the buttons in the create drilldown I think it makes the most sense for the manage drilldowns to not be cramped and have the maxWidths be medium if possible.

Screenshot 2024-07-24 at 1 19 51 PM

Edit drilldown

Size s makes it look more cramped and breaks the word Discover onto two lines:
Screenshot 2024-07-24 at 1 15 09 PM

Size m
Screenshot 2024-07-24 at 1 09 35 PM

Create drilldown:

I'm leaning towards size 's' for the create drilldown flyout based on the following screenshots:

Size s
Screenshot 2024-07-24 at 1 12 46 PM

Size m
Screenshot 2024-07-24 at 1 10 58 PM

@rshen91 rshen91 changed the title [Dashboard] Add size 's' to any flyouts' width not already specified in dashboard [Dashboard] Add size 's' to Panel Settings flyouts and 'm' to drilldown widths not already specified in dashboard Jul 24, 2024
@rshen91 rshen91 self-assigned this Jul 24, 2024
@rshen91 rshen91 added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas release_note:skip Skip the PR/issue when compiling release notes impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Dashboard Usability Related to the Dashboard Usability initiative v8.16.0 labels Jul 24, 2024
@rshen91 rshen91 force-pushed the fix-dashboard-max-width branch from 6b4b58a to 2827d33 Compare July 25, 2024 21:03
@rshen91 rshen91 changed the title [Dashboard] Add size 's' to Panel Settings flyouts and 'm' to drilldown widths not already specified in dashboard [Dashboard] Add maxWidth 's' to Panel Settings flyouts and 'm' to drilldown widths not already specified in dashboard Jul 25, 2024
@rshen91 rshen91 marked this pull request as ready for review July 25, 2024 23:08
@rshen91 rshen91 requested a review from a team as a code owner July 25, 2024 23:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@botelastic botelastic bot added the Feature:Drilldowns Embeddable panel Drilldowns label Jul 26, 2024
@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner July 26, 2024 15:47
@rshen91 rshen91 removed the request for review from a team July 26, 2024 18:07
@Heenawter Heenawter self-requested a review July 26, 2024 18:42
Copy link
Contributor

@Heenawter Heenawter left a comment

Choose a reason for hiding this comment

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

It looks like maxWidth doesn't accept 's' | 'm' | 'l' style sizes - only the size prop accepts these. Personally, I think we should do the following:

  1. The control settings flyout should have a hard coded size of s - this is more inline with the panel settings flyout, which I think makes sense
  2. The flyout drilldowns should probably still use the maxSize prop rather than size - and for that, we would have to give it a specific width in pixels or percentage. Perhaps 500 or 600?

cc @cqliu1, just in case you have input here on what you think an appropriate size would be :)

Copy link
Contributor

@Heenawter Heenawter left a comment

Choose a reason for hiding this comment

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

This works much better - thanks!! 🎉 Code review + quick local test. Left one small nit but everything else looks good!

@@ -126,6 +126,7 @@ export class FlyoutCreateDrilldownAction implements Action<EmbeddableApiContext>
core
),
{
maxWidth: 500,
Copy link
Contributor

@Heenawter Heenawter Jul 26, 2024

Choose a reason for hiding this comment

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

nit Could we make this a constant so that flyout_create_drilldown and flyout_edit_drilldown stay in sync? 👀

Also, I think 500 might be a little small - maybe 600 would be better? Or maybe size of l might work? Leaving this up to you 👍

Screenshot 2024-07-26 at 3 19 10 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense to me! Changes in 0200bf9

@rshen91 rshen91 enabled auto-merge (squash) July 26, 2024 21:22
@@ -75,3 +75,5 @@ export const createDrilldownTemplatesFromSiblings = (

return templates;
};

export const drilldownMaxWidth = 500;
Copy link
Contributor

@Heenawter Heenawter Jul 26, 2024

Choose a reason for hiding this comment

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

Sorry!! Can you rename this const to align with our constant naming convention? And perhaps change its value as shown in #189009 (comment)? (I edited the comment after the original post - sorry if you didn't see that 🙈 )

Suggested change
export const drilldownMaxWidth = 500;
export const DRILLDOWN_MAX_WIDTH = 500;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah sorry yes I missed that - fixed in b1c4e50

@Heenawter Heenawter disabled auto-merge July 26, 2024 21:32
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
controls 202.2KB 202.2KB +9.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dashboardEnhanced 17.8KB 17.8KB +26.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @rshen91

@rshen91 rshen91 merged commit 1f00087 into elastic:main Jul 27, 2024
19 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 27, 2024
@rshen91 rshen91 deleted the fix-dashboard-max-width branch July 27, 2024 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Drilldowns Embeddable panel Drilldowns impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Dashboard Usability Related to the Dashboard Usability initiative release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard Usability] Set max width on flyouts
5 participants