Skip to content

[Bugfix:Calendar] improve calendar layout structure#12564

Merged
bmcutler merged 4 commits into
Submitty:mainfrom
gherardi:fix-calendar-ui
Mar 26, 2026
Merged

[Bugfix:Calendar] improve calendar layout structure#12564
bmcutler merged 4 commits into
Submitty:mainfrom
gherardi:fix-calendar-ui

Conversation

@gherardi

Copy link
Copy Markdown
Contributor

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?

  • Bug fix: the year selection component no longer appears cropped on safari.
  • Flexbox refactor: the structure of the 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

Registrazione.schermo.2026-03-10.alle.15.15.04.mov

After

image
Registrazione.schermo.2026-03-10.alle.15.13.11.mov

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Mar 10, 2026
@gherardi
gherardi marked this pull request as ready for review March 10, 2026 14:18
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Mar 10, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Mar 10, 2026
@Farhanxikram Farhanxikram self-assigned this Mar 10, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Mar 10, 2026
@gherardi

Copy link
Copy Markdown
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 Farhanxikram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 24, 2026

@JManion32 JManion32 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 JManion32 changed the title [Bugfix: Calendar] improve calendar layout structure [Bugfix:Calendar] improve calendar layout structure Mar 26, 2026
@bmcutler
bmcutler merged commit 20baa2c into Submitty:main Mar 26, 2026
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Mar 26, 2026
@gherardi
gherardi deleted the fix-calendar-ui branch March 26, 2026 19:36
JManion32 added a commit that referenced this pull request 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG] Can't see the entire date on Calendar tab

4 participants