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

feat(Meter): new component #708

Closed
wants to merge 3 commits into from

Conversation

DarkGhostHunter
Copy link
Contributor

@DarkGhostHunter DarkGhostHunter commented Sep 21, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This component is basically <meter> with some amphetamines. It follows the same principle of #697:

  • Allows the use of min and max values.
  • Percent indicator and its slot
  • Label and its slot
  • ABLE TO GROUP THEM

You read that right: YOU CAN GROUP THEM.

image

Things to note

  • No optimum|high|low props: you can change the bar behavior with Vue already. Below a value? Turn it red, or change the label.
  • The <UMeterGroup> reuses the <Meter> but uses the default slot to inject the cloned VNodes (which are edited to meet the group criteria). I could done a normal .vue file but I didn't find how to override the default slot being passed without doing h(...) into oblivion.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
ui ❌ Failed (Inspect) Oct 14, 2023 6:16pm

@DarkGhostHunter
Copy link
Contributor Author

All deployments are failing and I can't check why. The only clue is that on my machine it's LandingCard.vue the culprit, which is from @nuxt-pro/ui or something like that.

@benjamincanac
Copy link
Member

It seems the Vercel build breaks because of this line: https://github.com/nuxt/ui/pull/708/files#diff-041bae31f76c99f1b1872d3aaf8b763b4363e117deb1cad1141d90a8d3639d0fR131. I didn't get what's going on with LandingCard? Would you mind opening a new issue for this?

[09:43:08.894] [error] [nuxt] [request error] [unhandled] [500] can not read a block mapping entry; a multiline key may not be an implicit key (18:1)
[09:43:08.894] 
[09:43:08.894]  15 | <UMeter :value="12" color="oran ...
[09:43:08.894]  16 | <UMeter :value="37" color="yell ...
[09:43:08.894]  17 | <UMeter :value="52" color="gree ...
[09:43:08.894]  18 | 
[09:43:08.895] ------^

@DarkGhostHunter
Copy link
Contributor Author

I think I’ll try to reload and reinstall the dev branch all over again.

@DarkGhostHunter
Copy link
Contributor Author

No luck and I can’t see why it’s failing.

@DarkGhostHunter
Copy link
Contributor Author

It seems the Vercel build breaks because of this line: https://github.com/nuxt/ui/pull/708/files#diff-041bae31f76c99f1b1872d3aaf8b763b4363e117deb1cad1141d90a8d3639d0fR131. I didn't get what's going on with LandingCard? Would you mind opening a new issue for this?

[09:43:08.894] [error] [nuxt] [request error] [unhandled] [500] can not read a block mapping entry; a multiline key may not be an implicit key (18:1)
[09:43:08.894] 
[09:43:08.894]  15 | <UMeter :value="12" color="oran ...
[09:43:08.894]  16 | <UMeter :value="37" color="yell ...
[09:43:08.894]  17 | <UMeter :value="52" color="gree ...
[09:43:08.894]  18 | 
[09:43:08.895] ------^

Update: I just forgot to use dev:prepare. Error dissapeared after that. lol.

@DarkGhostHunter
Copy link
Contributor Author

DarkGhostHunter commented Oct 14, 2023

Going to give up this PR for a new up-to-date PR later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants