Skip to content

refactor nav as function component#136

Open
CrystalSplitter wants to merge 6 commits intoFluentFlame:masterfrom
yang991178:master
Open

refactor nav as function component#136
CrystalSplitter wants to merge 6 commits intoFluentFlame:masterfrom
yang991178:master

Conversation

@CrystalSplitter
Copy link
Copy Markdown
Collaborator

Back-merge from fluent-reader

Ideally, we should always be ahead of fluent-reader and integrate the changes
in case we ever do get the chance to port our fixes over.

- Convert Menu class component to functional component using useAppSelector/useAppDispatch
- Inline Redux connect() logic from menu-container.tsx
- Replace <a> tags with <button> tags for .btn elements
- Add button reset styles to global.css for .btn class
- Add ARIA labels and roles for accessibility
- Delete menu-container.tsx
- Convert Page class component to functional component using useAppSelector/useAppDispatch
- Inline Redux connect() logic from page-container.tsx
- Replace <a> tags with <button> tags for .btn elements
- Add alt attributes to logo images, aria-labels to nav buttons
- Fix negated ternary condition and leaked value warnings
- Delete page-container.tsx
- Convert Settings class component to functional component using useAppSelector/useAppDispatch
- Inline Redux connect() logic from settings-container.tsx
- Convert componentDidUpdate lifecycle to useEffect with display dependency
- Use useRef for exitting to avoid stale closure in keydown handler
- Replace <a> tag with <button> tag for back button
- Add aria-label and disabled attribute for accessibility
- Fix nested if-in-else structure
- Delete settings-container.tsx
@nubesurrealista
Copy link
Copy Markdown
Collaborator

Tbh I'm not sure about merging upstream because the code's been messed with by AI, which goes against our contribution guidelines, so I think we really need to check that everything is safe, correct, and actually works, and maybe even rewrite or fix stuff if we have to.

@CrystalSplitter
Copy link
Copy Markdown
Collaborator Author

Yeah, I'm seeing that now. I do think it would be nice to get rid of the container components, as I think they are a design anti-pattern, but it's not urgent.

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.

3 participants