-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add multi-page UI for settings & imports #30
Conversation
Awesome, this looks great. Nice design as well. As usual, there are a few things in the code that I would like to either modify or understand the reason behind:
|
@@ -3,4 +3,4 @@ dist | |||
extension/background.js | |||
extension/content_script.js | |||
extension/overview/overview.js | |||
|
|||
extension/options/options.js |
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.
Could you rebase -i
the commits and fixup
this commit to glue it into the one before it? Otherwise this repo will keep carrying 2MB of unused code around for ever.
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.
Hey, I've run git filter-branch to remove all traces of options.js
from the commit history. Commit 50a2ffB
no longer includes the file.
This is the easiest approach I've come across to bundle together everything that's required for a component to render. The preferred option in my opinion would be to use css-modules but that requires a lot of setup and could be a future enhancement.
Yeah, I guess I got a bit too carried away with abstracting out components that can be reused. I'll fix this.
That's a really good point, I'll take a brief look into it.
In my view, container components should be where all of the event handling and simple application logic is contained. Components should just be "dumb" helpers that take in props and render render them. This is why I've used class notation for containers where I'm expecting event handlers and other functionality to be added whereas navigation and other components are simple functions.
I'll fix the newlines, but comments are ingrained in me I'm afraid 😛 Todo list:
|
Agreed, this looks awesome! |
Ok, let's keep the style in javascript for now and set up sass or css-modules soon.
Understood. My expectation is just a bit different, as I tend to use Redux for all state management, making that pretty much every defined component is a dumb prop-renderer (where event handlers are props too). Let's move on though, it's fine as it is. I'll just do a quick One question still: I would like to publish the whole thing in the public domain, free from copyright restrictions (see e.g. Unlicense or CC0). Are you okay with a "relinquishment in perpetuity of all present and future rights to this software under copyright law"? |
@Treora I'm okay with that. We should also look into bringing in eslint to automatically complain about semicolons and other undesirables at build time. |
So, first PR merged. 🎉 |
Awesome, onto the next one 👍 |
Wohoo! Off to new worlds! |
Overview
Adds functionality to easily create multiple pages within the options of the chrome extension. We do this by creating a separate react application with hash-based routing. The feature is triggered by clicking the 'Options' link in
chrome://extensions
Demonstration
Future considerations
If accepted, this PR would fix #19