Skip to content

#34195 Scrollbars hide gantt content#103

Open
daniela-mateescu wants to merge 3 commits intomaster-flower-platformfrom
dana-RM34195-scrollbars-hide-gantt-content
Open

#34195 Scrollbars hide gantt content#103
daniela-mateescu wants to merge 3 commits intomaster-flower-platformfrom
dana-RM34195-scrollbars-hide-gantt-content

Conversation

@daniela-mateescu
Copy link
Collaborator

Proposed Change:

What is your change

Change type

Put an x in the boxes that apply

  • Bugfix
  • New feature

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@gemini-code-assist
Copy link

Summary of Changes

Hello @daniela-mateescu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue where scrollbars were obscuring content within the Gantt chart. The solution involves a slight increase in scrollbar dimensions, a modernization of scrollbar arrow styling using inline SVG data URIs for better maintainability and performance, and a crucial adjustment to the timeline's maximum date calculation to prevent content from being hidden by the vertical scrollbar. These changes collectively enhance the visibility and usability of the Gantt chart interface.

Highlights

  • Scrollbar Size Increase: The default SCROLLBAR_SIZE has been increased from 10 pixels to 16 pixels, making scrollbars more prominent.
  • Modernized Scrollbar Styling: Scrollbar arrow icons have been refactored to use inline SVG data URIs directly within the CSS, replacing external image files. This change also includes new styling for scrollbar tracks.
  • Gantt Content Visibility Fix: The getMaxDate calculation in the timeline component has been updated to dynamically account for the width of the vertical scrollbar. This ensures that content is no longer hidden behind the scrollbar, improving the user experience for Gantt charts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue where scrollbars were obscuring content in the Gantt chart. The core of the fix is in src/timeline.js, where the timeline's maximum date is now extended to account for the width of the vertical scrollbar, preventing content from being hidden. Additionally, the scrollbar styling has been significantly improved in src/style.css by replacing PNG image assets with inline SVGs, which is a great enhancement for performance and scalability. The scrollbar size has also been adjusted. My review includes a high-priority comment regarding the fragility of the scrollbar width calculation and several medium-priority suggestions to improve the new CSS for better consistency and maintainability.

src/timeline.js Outdated
Comment on lines 902 to 905

Choose a reason for hiding this comment

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

high

The calculation of vScrollbarWidth relies on the internal DOM structure of the react-virtualized Grid component (this._gridDomNode.firstChild). This approach is fragile and could break if react-virtualized changes its internal structure in a future update. While this might be the only way to get the scrollbar width, it would be beneficial to add a comment explaining this dependency and the potential risk. For example: // This calculation is fragile as it depends on the internal DOM structure of react-virtualized's Grid.

For better readability, you could also consider extracting this._gridDomNode.firstChild into a variable to avoid accessing it twice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


.rct9k-horizontal-scrollbar-inner {
height: 1px;
padding-top: 2px;

Choose a reason for hiding this comment

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

medium

The padding-top: 2px; appears to be a "magic number". To improve code maintainability, please add a comment explaining the purpose of this padding. For instance, is it for visual alignment with another element?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

src/style.css Outdated
Comment on lines 97 to 98

Choose a reason for hiding this comment

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

medium

The width and height of the scrollbar button are set to 15px, while the background-size is 16px 16px and the SCROLLBAR_SIZE constant was updated to 16. This inconsistency may cause the background image to be clipped. For consistency and to prevent potential rendering issues, it's recommended to set the width and height to 16px.

Suggested change
width: 15px;
height: 15px;
width: 16px;
height: 16px;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

src/style.css Outdated
Comment on lines 110 to 111

Choose a reason for hiding this comment

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

medium

The width and height of the scrollbar button are set to 15px, while the background-size is 16px 16px and the SCROLLBAR_SIZE constant is 16. This inconsistency may cause the background image to be clipped. For consistency and to prevent potential rendering issues, it's recommended to set the width and height to 16px.

Suggested change
width: 15px;
height: 15px;
width: 16px;
height: 16px;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

src/style.css Outdated
Comment on lines 133 to 134

Choose a reason for hiding this comment

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

medium

The width and height of the scrollbar button are set to 15px, while the background-size is 16px 16px and the SCROLLBAR_SIZE constant is 16. This inconsistency may cause the background image to be clipped. For consistency and to prevent potential rendering issues, it's recommended to set the width and height to 16px.

Suggested change
width: 15px;
height: 15px;
width: 15px;
height: 16px;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

src/style.css Outdated
Comment on lines 146 to 147

Choose a reason for hiding this comment

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

medium

The width and height of the scrollbar button are set to 15px, while the background-size is 16px 16px and the SCROLLBAR_SIZE constant is 16. This inconsistency may cause the background image to be clipped. For consistency and to prevent potential rendering issues, it's recommended to set the width and height to 16px.

Suggested change
width: 15px;
height: 15px;
width: 16px;
height: 16px;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments