fix(ui): optimise AdditionalResSection layout for iPad (issue #916)#1092
Open
EdrilanBerisha wants to merge 3 commits into
Open
fix(ui): optimise AdditionalResSection layout for iPad (issue #916)#1092EdrilanBerisha wants to merge 3 commits into
EdrilanBerisha wants to merge 3 commits into
Conversation
Fixes SAP#916. On iPad-sized viewports (~768px-1024px wide) the 'Additional Resources' section was showing only 1 column, causing the last card description to be cut in half at the bottom. The previous CSS had a single tablet breakpoint at max-width: 996px that switched directly to 1 column. This covers a range that includes iPad screens (768px-996px) and caused the layout issue. Fix: the breakpoint is now split into two rules: - iPad / large tablet (601px–996px): 2-column grid (repeat(2, 1fr)) with max-width 700px and centered, so cards fit comfortably without being cut off. - Mobile (≤600px): 1-column grid, unchanged. Testing: - Added src/sections/__tests__/AdditionalResSection.test.tsx (16 tests) covering rendering, structure, data integrity, and a CSS breakpoint regression note for issue SAP#916. - Added __mocks__/@docusaurus/{Link,useBaseUrl,theme-common, useDocusaurusContext}.js so the section can be rendered in Jest without a Docusaurus runtime. - Updated jest.config.js moduleNameMapper to resolve these @Docusaurus packages via the new manual mocks. - Installed identity-obj-proxy (dev dependency) to support CSS module mocking in Jest.
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 #916.
On iPad-sized viewports (~768px-1024px wide) the 'Additional Resources' section was showing only 1 column, causing the last card description to be cut in half at the bottom.
The previous CSS had a single tablet breakpoint at max-width: 996px that switched directly to 1 column. This covers a range that includes iPad screens (768px-996px) and caused the layout issue.
Fix: the breakpoint is now split into two rules:
Testing:
hey @cernus76 could you please review this and let me know if you wish something to be changed