Closed btea closed 1 year ago
Hi, do you mean the publint version, or the package version? Changing the publint version is a little tricky since there are code shipped to specifically handle a version of publint, e.g. converting the results to human-readable messages.
If you mean the package version, that's definitely a welcome change! I actually experimented that a bit last week, but it's hard to get the design right. I could also push the wip branch up for reference.
Yeah, I mean the package version. My current idea is to get all the versions directly through the jsdelivr API.
For example, get the vite
version, https://data.jsdelivr.com/v1/package/npm/vite
Sounds great, feel free to send a PR if you'd like. I can also push my branch later when I get to my laptop, but it's a bit outdated now.
I'm currently working on some design touch ups to the site locally that's no published yet, in case you're seeing some things different.
Here it is: https://github.com/bluwy/publint/tree/switch-version. It's actually kinda almost there I think, but needs a little polishing.
I tried it and it looks amazing! 👍
However, there is a little problem, when the version is switched, there will be page switching flashing, which does not look so smooth.
Yeah I noticed that too. I don't know why it's doing that and hopefully doesn't happen much in prod. That could use some polishing.
Feel free to work on top of the branch if you'd like, but if not no worries too. I'm working on a whole site improvement and will also take on that feature in a couple days if not.
I'm relatively new to Sevelte. I tried a similar effect directly using the select
tag locally, and the above situation does not occur when switching. I found that you added a new component PackageVersion.svelte
, perhaps because of it?
Since my local logic is written directly in the Package.svelte
component, there is this guess. 🤔
You're making overall improvements to the site, and I think it's better to keep your rhythm, so I'm not going to make changes, but I'll keep looking at the code.
Awesome. Yeah I tried with select
first too, but unfortunately when we lazily fetch the options, Safari doesn't update the list automatically. It was also hard to style it, so I went with the manual select implementation.
The compatibility handling of native select
is a real headache. 🤦♂️
0012a81 should implement this and will release the site later tonight. Closing this for now.
The new site style looks so cool! 👍
Sometimes there is a problem in the new version, but the previous version is no problem, add a select to quickly switch the version to easily locate which version is the problem.
I can try to create a PR if you think it works.。