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

fix(NcCounterBubble): show original count in title when shortened #6395

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jan 18, 2025

☑️ Resolves

🖼️ Screenshots

image

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

@ShGKme ShGKme added bug Something isn't working 3. to review Waiting for reviews labels Jan 18, 2025
@ShGKme ShGKme added this to the 8.23.0 milestone Jan 18, 2025
@ShGKme ShGKme requested review from susnux and Antreesy January 18, 2025 21:22
@ShGKme ShGKme self-assigned this Jan 18, 2025
@susnux susnux changed the title fix(NcCounterButton): show original count in title when shortened fix(NcCounterBubble): show original count in title when shortened Jan 18, 2025
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice but the commit message is wrong, it says "NcCounterButton" but it is "NcCounterBubble" 😉

@@ -243,7 +243,7 @@ export default {
methods: {
humanizeCount(count) {
if (this.raw) {
return count
return count.toString()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this but this is also fine for me :)

Suggested change
return count.toString()
return String(count)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer .toString() as a safer method. If something went wrong and count is invalid, e.g. null or undefined, .toString() fails explicitly while String constructor successfully created string 'undefined' which goes to UI or further to computations.

@ShGKme ShGKme force-pushed the fix/NcCounterBubble--title branch from 193acde to 78cd95f Compare January 19, 2025 14:45
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 19, 2025

the commit message is wrong, it says "NcCounterButton" but it is "NcCounterBubble" 😉

Fixed

@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 19, 2025

/backport to next

@susnux susnux merged commit 9ede29f into master Jan 20, 2025
19 checks passed
@susnux susnux deleted the fix/NcCounterBubble--title branch January 20, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NcCounterBubble] RFE: Tooltip with unshortened value
3 participants