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
Next: ratings #2599
base: next
Are you sure you want to change the base?
Next: ratings #2599
Conversation
|
Someone is attempting to deploy a commit to the Skeleton Labs Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@Mahmoud-zino just took a quick look at this. I won't provide a full review as I know it's still a draft - but make sure you're not hardcoding SVGs within components if it can be avoid. While we're taking an opinionated stance on Lucide, that doesn't mean we're keen to embed icons from it. |
This is just a fallback svg (star since it is the most common one for rating) but if you want to use another approach I am totally ok with it, just let me know what would you prefer. |
Yeah, no fallback SVG. Users will be required to add their own icons. Placeholder text is probably fine though. |
@endigo9740 Please ignore the fallback SVG at the moment, I want to get your opinion on the fractional approach before continuing the implementation. |
@Mahmoud-zino |
@Mahmoud-zino as part of prepping for tomorrow's release I'm doing a pass through all pending PRs. Let me know a status update on this one. What's remaining and ETA for delivery. If you're bogged down, let me or the team know and someone can likely jump in and pick this up! (Hugo, etc) |
@endigo9740 Functionality and design of the component is now implemented and ready for review 👍 |
@Mahmoud-zino I'm so sorry, I've been swamped with the Floating UI Svelte stuff this week and completely missed this. I'll aim to review in the next day or two, but could you do me a huge favor - could you install Lucide for the Svelte and React packages as dev dependencies (via
Remember, we will NEVER use Lucide in our components, but it's perfectly valid to pass to our components in the SvelteKit and Vite/React sandboxes. I've been meaning to do this for a while, and it'll be helpful for your component here. Please and thanks sir! |
@endigo9740 Sorry for taking so long.... |
Thanks @Mahmoud-zino this is on my agenda to review today, assuming no further interruptions! |
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.
@Mahmoud-zino here's my review. A few things of note:
- I LOVE the fractional units. That's so much cleaner.
- I'm kind of so-so on the hover states, that may be overkill and adding extra complexity
- Keep the interaction though. Clicking to set state is nice.
- If we can reduce complexity enough, I'd like us to consider inserting input state so this can be used in forms!
Let me know if I can clarify any points raised below. I'd suggest we go through another round of review before proceeding to tests and React components.
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/lib/components/Rating/Rating.svelte
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/routes/components/ratings/+page.svelte
Outdated
Show resolved
Hide resolved
@Mahmoud-zino I've bumped this back to a draft to help better indicate when it's ready for review again! |
@endigo9740 I have left you a couple of comments back that needs some clarifications 😄 Thanks.
Do you mean adding a prop so users can change the type of the buttons to submit a form? if not, could you please provide more details? |
@Mahmoud-zino this is still on my list to review. Just tied up with the auto-doc stuff atm.
I believe buttons and inputs cannot have their type dynamically set. Svelte will complain about this. In this case I think we should rely on users to handle submit themselves and keep the buttons at |
@Mahmoud-zino hopefully you don't murder me for taking the initiative here, but I've completed a PR review and a bit of a refactor to the component. This streamlines a lot of the complexity and uses much less code for the same results. Notable changes include:
My hope here is that by slimming down the complexity, it should make it easier to focus on adding keyboard interactions. That would be the final piece before this ready to create documentation and port to React. I'll set this back to a draft state until we reach one of those milestones. Let me know what you think! |
Linked Issue
Closes #2392