-
Notifications
You must be signed in to change notification settings - Fork 2
Casimir43/enhancement/660 update prg page to match newest figma design #668
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
Open
Casimir43
wants to merge
14
commits into
dev
Choose a base branch
from
casimir43/enhancement/660-update-prg-page-to-match-newest-figma-design
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
639b2c5
restructured prg page layout and add registry section title
Casimir43 8c855a2
add tabbed viewer for previous action plan,annual report, associationβ¦
Casimir43 573e6e1
restyled titles,board cards, tabcontent and first implementation of mβ¦
Casimir43 c54e059
images for tabs on smaller screens
Casimir43 eb1f3d7
global var
Casimir43 afdcbc9
compact cscc with placeholders and mixins
Casimir43 616357e
removed dead css classes and fixed breakinpoints
Casimir43 61e3fa0
fixed duplicate boardmember rendering
Casimir43 02daf4a
fix: profession text exceed card border
Casimir43 508da33
style(PRGPg): update tab image to 30% width, add spacing and font-sizβ¦
Casimir43 e3d463f
test(PRGPg): add board member rendering and team link tests
Casimir43 208f081
fix(prg): disable CustomSwitch on mobile, loop tabs stacked
Casimir43 18fc809
fix(prg): use stacked tab cards on mobile/tablet and make buttons fluid
Casimir43 e6d7875
chore(prg): remove unused translations and clean up registry markup
Casimir43 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
390 changes: 292 additions & 98 deletions
390
frontend-next-migration/src/preparedPages/PRGPage/ui/PRGPage.module.scss
Large diffs are not rendered by default.
Oops, something went wrong.
76 changes: 76 additions & 0 deletions
76
frontend-next-migration/src/preparedPages/PRGPage/ui/PRGPage.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| import { render, screen } from '@testing-library/react'; | ||
| import PRGPage from './PRGPage'; | ||
|
|
||
| jest.mock('@/shared/i18n', () => ({ | ||
| useClientTranslation: jest.fn(), | ||
| })); | ||
|
|
||
| jest.mock('@/shared/lib/hooks/useSizes', () => ({ | ||
| __esModule: true, | ||
| default: () => ({ isMobileSize: false, isTabletSize: false }), | ||
| })); | ||
|
|
||
| jest.mock('@/shared/ui/CustomSwitch', () => ({ | ||
| CustomSwitch: ({ elements }: { elements: { children: React.ReactNode }[] }) => ( | ||
| <div data-testid="custom-switch"> | ||
| {elements.map((el, i) => ( | ||
| <span key={i}>{el.children}</span> | ||
| ))} | ||
| </div> | ||
| ), | ||
| CustomSwitchItems: { ToggleItem: 'ToggleItem' }, | ||
| })); | ||
|
|
||
| jest.mock('@/shared/ui/AppLink/AppLink', () => ({ | ||
| AppLink: ({ | ||
| children, | ||
| to, | ||
| isExternal: _isExternal, | ||
| ...props | ||
| }: { | ||
| children: React.ReactNode; | ||
| to: string; | ||
| isExternal?: boolean; | ||
| [key: string]: unknown; | ||
| }) => ( | ||
| <a | ||
| href={to} | ||
| {...props} | ||
| > | ||
| {children} | ||
| </a> | ||
| ), | ||
| })); | ||
|
|
||
| jest.mock('@/shared/ui/PageTitle', () => ({ | ||
| PageTitle: ({ titleText }: { titleText: string }) => <h1>{titleText}</h1>, | ||
| })); | ||
|
|
||
| jest.mock('@fortawesome/react-fontawesome', () => ({ | ||
| FontAwesomeIcon: () => <span data-testid="fa-icon" />, | ||
| })); | ||
|
|
||
| import { useClientTranslation } from '@/shared/i18n'; | ||
|
|
||
| describe('PRGPage', () => { | ||
| beforeEach(() => { | ||
| (useClientTranslation as jest.Mock).mockReturnValue({ | ||
| t: (key: string) => key, | ||
| }); | ||
| }); | ||
|
|
||
| it('renders all board members', () => { | ||
| render(<PRGPage />); | ||
|
|
||
| expect(screen.getByText('Helena Pavloff-Pelkonen')).toBeInTheDocument(); | ||
| expect(screen.getByText('Esa Pavloff-Pelkonen')).toBeInTheDocument(); | ||
| expect(screen.getByText('Emmi-Irina Pavloff')).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('renders team link pointing to /team', () => { | ||
| render(<PRGPage />); | ||
|
|
||
| const teamLink = screen.getByText('alt-zone-team').closest('a'); | ||
| expect(teamLink).toHaveAttribute('href', '/team'); | ||
| }); | ||
| }); |
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
Binary file added
BIN
+5.36 KB
frontend-next-migration/src/shared/assets/images/PRGPage/actionplan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.9 KB
frontend-next-migration/src/shared/assets/images/PRGPage/annualreport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.8 KB
frontend-next-migration/src/shared/assets/images/PRGPage/associationrules.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thing: Why are you using
<img>tag here instead of the Nextjs<Image>tag? In general we should avoid using code that requires disabling eslint checks if there are working alternatives.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a good catch, I completely missed it... π