Skip to content
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

refactor: improved-extension-navigation #99

Merged
merged 2 commits into from
May 22, 2023
Merged

refactor: improved-extension-navigation #99

merged 2 commits into from
May 22, 2023

Conversation

Anush008
Copy link
Member

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR updates the extension dropdown navigation using the react-chrome-extension-router package that results in improved code readability and offers a simplified navigation solution for future pages. Additionally, it eliminates the need for a React context provider and consumer for navigation and prop-passing purposes. This pull request is based on the suggestion from @doaortu.

Related Tickets & Documents

Original suggestion

Mobile & Desktop Screenshots/Recordings

No visual changes.

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

@Anush008 Anush008 requested review from diivi and bdougie May 22, 2023 13:49
@diivi
Copy link
Collaborator

diivi commented May 22, 2023

Tbh, I'm not a fan of using a package that was last updated in Aug 2022 and has <50 stars, over something we can edit easily. But I'll review this tonight.

@Anush008
Copy link
Member Author

Anush008 commented May 22, 2023

Tbh, I'm not a fan of using a package that was last updated in Aug 2022 and has <50 stars, over something we can edit easily. But I'll review this tonight.

I did notice that it hasn't been updated of late. But the implementation of the package is pretty solid and straightforward using useEffect() and a local stack without any dependency overhead. The usage is intuitive and the prop-passing is way easier than using a context consumer. We can come-up with our own implementation if we encounter any bugs moving forward.

You can take a look at the implementation here. They are utility functions exported from a common file. https://github.com/kelsonpw/react-chrome-extension-router/blob/master/src/index.ts.

Copy link
Collaborator

@diivi diivi left a comment

Choose a reason for hiding this comment

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

Works, and the code looks simpler!

@bdougie bdougie merged commit 5b2f5c1 into beta May 22, 2023
3 checks passed
github-actions bot pushed a commit that referenced this pull request May 22, 2023
### [1.1.1-beta.1](v1.1.0...v1.1.1-beta.1) (2023-05-22)

### πŸ§‘β€πŸ’» Code Refactoring

* improved-extension-navigation ([#99](#99)) ([5b2f5c1](5b2f5c1))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.1.1-beta.1 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

@Anush008 Anush008 deleted the extension-router branch May 23, 2023 17:54
github-actions bot pushed a commit that referenced this pull request May 25, 2023
## [1.2.0](v1.1.0...v1.2.0) (2023-05-25)

### πŸ§‘β€πŸ’» Code Refactoring

* improved-extension-navigation ([#99](#99)) ([5b2f5c1](5b2f5c1))

### πŸ“ Documentation

* dev docs ([#83](#83)) ([4eff6eb](4eff6eb))

### πŸ› Bug Fixes

* adds demo to readme ([c27e614](c27e614))
* bump manifest version on main only ([#124](#124)) ([e4a86e4](e4a86e4))
* duplicate-button-injections using guards ([#110](#110)) ([3978766](3978766))

### πŸ• Features

* add PR velocity to profile page ([#111](#111)) ([ba7fad6](ba7fad6))
* generate code suggestions via AI ([#90](#90)) ([14eede1](14eede1)), closes [#104](#104)
* Manifest.json version bump ([#120](#120)) ([488046b](488046b))
* Resources page to link users to open-sauced feedback/discussions ([#100](#100)) ([3d607ae](3d607ae))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.2.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

zer0and1 added a commit to zer0and1/open-sauced.ai that referenced this pull request Jul 26, 2023
### [1.1.1-beta.1](open-sauced/ai@v1.1.0...v1.1.1-beta.1) (2023-05-22)

### πŸ§‘β€πŸ’» Code Refactoring

* improved-extension-navigation ([#99](open-sauced/ai#99)) ([5b2f5c1](open-sauced/ai@5b2f5c1))
zer0and1 pushed a commit to zer0and1/open-sauced.ai that referenced this pull request Jul 26, 2023
## [1.2.0](open-sauced/ai@v1.1.0...v1.2.0) (2023-05-25)

### πŸ§‘β€πŸ’» Code Refactoring

* improved-extension-navigation ([#99](open-sauced/ai#99)) ([5b2f5c1](open-sauced/ai@5b2f5c1))

### πŸ“ Documentation

* dev docs ([#83](open-sauced/ai#83)) ([4eff6eb](open-sauced/ai@4eff6eb))

### πŸ› Bug Fixes

* adds demo to readme ([c27e614](open-sauced/ai@c27e614))
* bump manifest version on main only ([#124](open-sauced/ai#124)) ([e4a86e4](open-sauced/ai@e4a86e4))
* duplicate-button-injections using guards ([#110](open-sauced/ai#110)) ([3978766](open-sauced/ai@3978766))

### πŸ• Features

* add PR velocity to profile page ([#111](open-sauced/ai#111)) ([ba7fad6](open-sauced/ai@ba7fad6))
* generate code suggestions via AI ([#90](open-sauced/ai#90)) ([14eede1](open-sauced/ai@14eede1)), closes [#104](open-sauced/ai#104)
* Manifest.json version bump ([#120](open-sauced/ai#120)) ([488046b](open-sauced/ai@488046b))
* Resources page to link users to open-sauced feedback/discussions ([#100](open-sauced/ai#100)) ([3d607ae](open-sauced/ai@3d607ae))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants