[Bugfix:Calendar] improve calendar layout structure#12564
Merged
Conversation
gherardi
marked this pull request as ready for review
March 10, 2026 14:18
Contributor
Author
|
Hi @Farhanxikram , I saw that you assigned yourself to this pull request. Do you have any suggestions or feedback on how I could improve it and bring it to completion? |
Farhanxikram
approved these changes
Mar 24, 2026
Farhanxikram
left a comment
There was a problem hiding this comment.
Hey sorry it took me so long to get back to you. I checked out your PR on both Chrome and Firefox and saw no issues, I then checked it out on my mac and it worked with Safari as well.
JManion32
approved these changes
Mar 26, 2026
JManion32
left a comment
Contributor
There was a problem hiding this comment.
Tested on Chrome/Linux.
Code changes are reasonable and Calendar UI looks much better with a fixed table width. All changes are described well in the description.
JManion32
added a commit
that referenced
this pull request
Mar 27, 2026
This reverts commit 20baa2c.
This was referenced Mar 27, 2026
williamjallen
pushed a commit
that referenced
this pull request
Mar 29, 2026
### Why is this Change Important & Necessary? Closes #12668 #12564 Improved the layout of the calendar, and also attempted to improve accessibility on different browsers. It was failing CSS lint since many of the rules were legacy. ### What is the New Behavior? Removed rules, but left functionality the same. If there is still an issue on specific browsers, we should make a new issue to adjust it specifically. ### What steps should a reviewer take to reproduce or test the bug or new feature? Calendar has fixed column widths and is responsive. ### Automated Testing & Documentation N / A ### Other information Not a breaking change.
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Mar 29, 2026
Fixes Submitty#12519 **Description:** This pull request addresses a UI rendering bug in the Calendar component specifically using Safari. By refactoring the component's layout to use flexbox and removing rigid CSS hardcoded constraints, we ensure a consistent and responsive experience across all modern browsers and screen sizes. ### Why is this Change Important & Necessary? This change is necessary to fix a visual bug where the year selection dropdown was being cropped on safari. The root cause was an hardcoded width on the select element that prevented the container from expanding to fit the text. By switching to a dynamic width and a flexbox based layout, we ensure that the calendar remains functional and visually correct on all platforms. ### What is the New Behavior? - Bug fix: the year selection component no longer appears cropped on safari. - Flexbox refactor: the structure of the <thead> element of the table has been migrated to flexbox. This prevents element collapse and ensures the central column (containing the month and year) scales correctly based on its children's dimensions. - Improved Responsiveness: the new layout is more robust across different screen sizes while maintaining the original design aesthetic. - Cross-Browser Standards: added css prefixers to ensure the flexbox and other properties and UI elements are interpreted consistently by chrome, firefox, and safari. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the application using safari. 2. Navigate to the calendar component and observe the year selector at the top. 3. Verify that the year is fully visible and not cut off. 4. Resize the browser window to ensure the flexbox layout adapts without elements overlapping or collapsing. 5. Perform the same checks in chrome and firefox to ensure no regressions were introduced. ### Automated Testing & Documentation This PR focuses on css layout and html structure. Manual visual testing was performed across major browsers (Chrome, Safari, Firefox) to confirm the fix and layout stability. No changes were made to the underlying JavaScript logic, so existing functional tests should remain unaffected. ### Other information - Is this a breaking change? No. - Does this PR include migrations to update existing installations? No. - Are there security concerns with this PR? No. ### Before https://github.com/user-attachments/assets/784a7a98-3077-4f9e-af67-3553a241d4ad ### After <img width="1582" height="1030" alt="image" src="https://github.com/user-attachments/assets/234efabf-0ddf-4ab1-874d-a2d261489247" /> https://github.com/user-attachments/assets/b75dc296-a639-406f-9d2c-40a401d8902f --------- Co-authored-by: Justin Manion <[email protected]>
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Apr 14, 2026
Fixes Submitty#12519 **Description:** This pull request addresses a UI rendering bug in the Calendar component specifically using Safari. By refactoring the component's layout to use flexbox and removing rigid CSS hardcoded constraints, we ensure a consistent and responsive experience across all modern browsers and screen sizes. ### Why is this Change Important & Necessary? This change is necessary to fix a visual bug where the year selection dropdown was being cropped on safari. The root cause was an hardcoded width on the select element that prevented the container from expanding to fit the text. By switching to a dynamic width and a flexbox based layout, we ensure that the calendar remains functional and visually correct on all platforms. ### What is the New Behavior? - Bug fix: the year selection component no longer appears cropped on safari. - Flexbox refactor: the structure of the <thead> element of the table has been migrated to flexbox. This prevents element collapse and ensures the central column (containing the month and year) scales correctly based on its children's dimensions. - Improved Responsiveness: the new layout is more robust across different screen sizes while maintaining the original design aesthetic. - Cross-Browser Standards: added css prefixers to ensure the flexbox and other properties and UI elements are interpreted consistently by chrome, firefox, and safari. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Open the application using safari. 2. Navigate to the calendar component and observe the year selector at the top. 3. Verify that the year is fully visible and not cut off. 4. Resize the browser window to ensure the flexbox layout adapts without elements overlapping or collapsing. 5. Perform the same checks in chrome and firefox to ensure no regressions were introduced. ### Automated Testing & Documentation This PR focuses on css layout and html structure. Manual visual testing was performed across major browsers (Chrome, Safari, Firefox) to confirm the fix and layout stability. No changes were made to the underlying JavaScript logic, so existing functional tests should remain unaffected. ### Other information - Is this a breaking change? No. - Does this PR include migrations to update existing installations? No. - Are there security concerns with this PR? No. ### Before https://github.com/user-attachments/assets/784a7a98-3077-4f9e-af67-3553a241d4ad ### After <img width="1582" height="1030" alt="image" src="https://github.com/user-attachments/assets/234efabf-0ddf-4ab1-874d-a2d261489247" /> https://github.com/user-attachments/assets/b75dc296-a639-406f-9d2c-40a401d8902f --------- Co-authored-by: Justin Manion <[email protected]>
GarvitKhandelwal31
pushed a commit
to GarvitKhandelwal31/Submitty
that referenced
this pull request
Apr 14, 2026
### Why is this Change Important & Necessary? Closes Submitty#12668 Submitty#12564 Improved the layout of the calendar, and also attempted to improve accessibility on different browsers. It was failing CSS lint since many of the rules were legacy. ### What is the New Behavior? Removed rules, but left functionality the same. If there is still an issue on specific browsers, we should make a new issue to adjust it specifically. ### What steps should a reviewer take to reproduce or test the bug or new feature? Calendar has fixed column widths and is responsive. ### Automated Testing & Documentation N / A ### Other information Not a breaking change.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #12519
Description:
This pull request addresses a UI rendering bug in the Calendar component specifically using Safari. By refactoring the component's layout to use flexbox and removing rigid CSS hardcoded constraints, we ensure a consistent and responsive experience across all modern browsers and screen sizes.
Why is this Change Important & Necessary?
This change is necessary to fix a visual bug where the year selection dropdown was being cropped on safari. The root cause was an hardcoded width on the select element that prevented the container from expanding to fit the text. By switching to a dynamic width and a flexbox based layout, we ensure that the calendar remains functional and visually correct on all platforms.
What is the New Behavior?
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
This PR focuses on css layout and html structure. Manual visual testing was performed across major browsers (Chrome, Safari, Firefox) to confirm the fix and layout stability. No changes were made to the underlying JavaScript logic, so existing functional tests should remain unaffected.
Other information
Before
Registrazione.schermo.2026-03-10.alle.15.15.04.mov
After
Registrazione.schermo.2026-03-10.alle.15.13.11.mov