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

#5616 remove duplicated scrollbars on dashboard #6990

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

l0rdn1kk0n
Copy link

@l0rdn1kk0n l0rdn1kk0n commented Jun 10, 2024

Description

Fixes an issue with duplicated scrollbars on dashboard.

I would highly recommend to refactor the mix and match between flex box and fixed sizes via styles as well as the div-hierarchy because it leads to hardly maintainable css and html.

Issues Resolved

closes #5616

Changelog

  • fix: Hide duplicated scrollbars in dashboard.

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • tested in chrome and firefox manually
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 6990.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "fix". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

l0rdn1kk0n and others added 7 commits June 11, 2024 13:13
Signed-off-by: Michael Haitz <[email protected]>
Signed-off-by: Michael Haitz <[email protected]>
* Add changelog

Signed-off-by: abbyhu2000 <[email protected]>

* add another changelog

Signed-off-by: abbyhu2000 <[email protected]>

---------

Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: Michael Haitz <[email protected]>
* Add Suchit to be a maintainer

Signed-off-by: abbyhu2000 <[email protected]>

* Changeset file for PR opensearch-project#6980 created/updated

* restore maintainer doc format

Signed-off-by: abbyhu2000 <[email protected]>

---------

Signed-off-by: abbyhu2000 <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Signed-off-by: Michael Haitz <[email protected]>
Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "fix". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

1 similar comment
Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "fix". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

Copy link
Collaborator

@virajsanghvi virajsanghvi left a comment

Choose a reason for hiding this comment

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

Could you make the hiding of scrollbars more generic for the use cases where it doesn't make sense to scroll?

@@ -0,0 +1,2 @@
fix:
- Hide duplicated scrollbars. ([#5616](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5616))
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: think this needs to be indented to fix the workflow failure.

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Member

Choose a reason for hiding this comment

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

The issue is in table vis. We use embeddable to add table vis in Dashboard. Therefore, update table vis should limit the impact to local. Table vis is in src/plugins/vis_type_table.

@@ -11,7 +11,7 @@
flex-direction: column;
width: 100%;
height: 100%;
overflow: auto;
overflow: hidden;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is too generic and likely needs to be more targeted. Some visualizations require scrolling to be able to access content when resized (e.g. text or controls)

@@ -11,7 +11,7 @@
flex-direction: column;
width: 100%;
height: 100%;
overflow: auto;
overflow: hidden;
position: relative;
padding: $euiSizeS;
Copy link
Collaborator

Choose a reason for hiding this comment

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

The reason we get the extra scrollbars is that .visualization has a padding of $euiSizeS = 8px while its child has a margin of - $euiSizeL / 2 = -12px. This makes the child larger than the parent, forcing the scrollbars to show up. I would recommend you revert back to overflow: auto and make this change instead:

Suggested change
padding: $euiSizeS;
padding: calc($euiSizeL / 2);

@ananzh
Copy link
Member

ananzh commented Jun 12, 2024

@l0rdn1kk0n Seems the changelog is updated from commits like 28e1c7c, not automatically generate from the bot.

To save you some future efforts, you could install https://github.com/apps/opensearch-changeset-bot then include Changelog in the description will trigger a changelog automatically.

Co-authored-by: Miki <[email protected]>
Signed-off-by: l0rdn1kk0n <[email protected]>
@ananzh
Copy link
Member

ananzh commented Jul 29, 2024

@l0rdn1kk0n do you have time to work on the fix? I updated it to 2.17

@ananzh ananzh added v2.17.0 and removed v2.16.0 labels Jul 29, 2024
@sejli
Copy link
Member

sejli commented Aug 30, 2024

@l0rdn1kk0n going to push this back to 2.18 since 2.17 release is upcoming.

@sejli sejli removed the v2.17.0 label Aug 30, 2024
@ananzh
Copy link
Member

ananzh commented Oct 30, 2024

@l0rdn1kk0n thanks for contributing in OSD. I will convert it to draft since no progress. Feel free to re-open once you fix the comments.

@ananzh ananzh marked this pull request as draft October 30, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] [TableVis] Embeddables are not sized correctly, and create vertical and horizontal scrollbars
8 participants