-
-
Notifications
You must be signed in to change notification settings - Fork 132
Adding devtools to make it easier to create snippets #39
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
Adding devtools to make it easier to create snippets #39
Conversation
✅ Deploy Preview for quicksnip ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Maybe instead of only checking the env, you could also check the url for |
The idea of the check is to exclude the component from being build in production mode, but yeah we could just make it an url param... We didn't really discuss much on how it should be handled |
If it's not in the main bundle and dynamically loaded, it shouldn't matter. And it adds some flexibility as there wouldn't be a need to run locally. I could be at someone's house, login to GH and make a pr, given I follow the guides. |
Yeah you're right, let me try something else for accessing the tool |
It doesn't seem right that a tool for one of the more defining feature of this product, adding your own snippet, is in the footer of the page. |
Either we can put a single button in the top right corner in navbar or we could create a huge button before each SnippetList, in which they will not have to enter category and language. I think, first option might be easier to handle and more intuitive. |
…w Component to display the generated snippet which already had the copy button as well.
Note that the user doesn't enter the language or category, the tool only generates the json for a single snippet, it's up to the user to then copy paste it, and create a PR adding it |
I see. 👍 |
I like this idea, too. In DEV mode, link button wouldn't be necessary. So, replacing it with "Open DevTools" button is a great idea. |
I really like what you did, Thanks |
Shall I move forward with feature? |
I think it's a good idea, you can do it |
…ing development. Also made some UI changes.
Added the 'Open Snippets Devtools' button in the top right corner but kept the Footer the same. Changed the Devtools modal to a more horizontal layout, to make more use of screen space as most people will be working from PCs. Also, it's more convenient when code snippets are large. I have still kept it responsive for small screen sizes where it will default back to the original column layout. Some more suggested features
|
Thanks for all the contributions. I will review it later today or tomorrow morning. If you have additional suggestions or feedback, write here. |
A first sketch of what devtools could look like, i'm not too good with css so it's ugly...
Feel free to contribute to this PR !
ATM the devtools is a form accessible only when in dev mode in vite.
They can be openned with a button that replaces the "Add your snippet" button in the header.
Openning them reveals a modal, with a form, taking infos about the snippet, and instantly generating JSON to match your input.