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

Not prompt me to pick what package manager to use everytime im copying the command #1059

Closed
tryggs opened this issue Apr 30, 2024 · 11 comments
Closed
Assignees
Labels
type: feature Introduction of new functionality to the application

Comments

@tryggs
Copy link

tryggs commented Apr 30, 2024

Describe the feature

The gesture is nice, but it gets annoying and I've mistakenly pasted the same thing in the command line multiple times because I thought that I had copied it but in reality, it still wants me to pick the package manager. How often does one switch what package manager you want to use?

Ask me once, remember, and have the option to change below the code block would be my suggestion.

@tryggs tryggs added the type: feature Introduction of new functionality to the application label Apr 30, 2024
@Michael-Obele
Copy link
Contributor

I'd love to fix this! In fact, I was just thinking about suggesting it myself. I think using cookies should definitely work for this, and I'm happy to make a pull request to implement it.

@huntabyte
Copy link
Owner

All you! @Michael-Obele could probably use a svelte-persisted-store for this

@Michael-Obele
Copy link
Contributor

I've made a PR, and I'd love comments on the chosen implementation and design choice.

@Michael-Obele
Copy link
Contributor

Michael-Obele commented Aug 24, 2024

I made a new PR: Implemented the suggestions using the Stripes UI and added svelte-persisted-store (missed it last time).
@tryggs what do you think?

@tryggs
Copy link
Author

tryggs commented Aug 24, 2024

Very cool @Michael-Obele!

This is basically exactly how I imagined it, although I had two thoughts:

  1. Design: maybe that wasn't the proposed final design, but it sticks out a little bit, especially with the border, and I think it should be a bit more muted.

  2. The command text: currently it's always showing the npm command, but wouldn't it be better if it was showing the command that is the users preferred package manager. So many times, even though there is a copy button, I find myself just selecting the text in the code block and copying, but maybe it's just me.

Those are just my two cents, but functionality wise this solves the problem I was facing when I first presented the idea.

So good job :)

@Michael-Obele
Copy link
Contributor

Thanks, @tryggs. The first point is very valid; I'll change the code to make the border a little more mutted. The second point is also an excellent idea, but I'm hesitant about implementing it because I still believe it falls outside the scope of the main issue. I'll be making some adjustments to include the first (and hopefully the second) suggestion.

Thank you for your time reviewing this.

@tryggs
Copy link
Author

tryggs commented Aug 24, 2024

That is very true @Michael-Obele

@Michael-Obele
Copy link
Contributor

@tryggs and @huntabyte I have made the recommended changes; please check it out and tell me what you think.
FYI: I didn't implement the second suggestion; it'll be best to open a different issue for it, and if it is approved, we can work towards implementing it.

@tryggs
Copy link
Author

tryggs commented Aug 26, 2024

@Michael-Obele As I said before, I'm not used to the whole open-source workflow so this is on me, but where can I see the changes you made?

@Michael-Obele
Copy link
Contributor

@Michael-Obele As I said before, I'm not used to the whole open-source workflow so this is on me, but where can I see the changes you made?

That's perfectly okay.
In the PR I created, look for 'Files Changed.' From there, you can either click 'Review in CodeSpace' or go to 'Code > Codespace > Create Codespace. You will need to cd into sites/docs, and from there you should be able to run pnpm i and pnpm dev and the rest should be easy.

@tryggs
Copy link
Author

tryggs commented Aug 26, 2024

@Michael-Obele As I said before, I'm not used to the whole open-source workflow so this is on me, but where can I see the changes you made?

That's perfectly okay. In the PR I created, look for 'Files Changed.' From there, you can either click 'Review in CodeSpace' or go to 'Code > Codespace > Create Codespace. You will need to cd into sites/docs, and from there you should be able to run pnpm i and pnpm dev and the rest should be easy.

Thank you for that little guide, very helpful :)

If @huntabyte approves the design I think that everything is working exactly like it should. However, if I may be a little annoying I'd say that the text in the select box should be either thinner, muted, smaller, or all, but that is not the important thing!

I believe that the command in the code block should* be whatever package manager that is selected, but that is something that absolutely can wait and be dealt with separately, to as you said avoid falling outside the scope of the current issue.

But I would say that it is ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants