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

Idea Hub Saved and Drafts tabs show number even when 0 #3964

Closed
felixarntz opened this issue Aug 30, 2021 · 6 comments
Closed

Idea Hub Saved and Drafts tabs show number even when 0 #3964

felixarntz opened this issue Aug 30, 2021 · 6 comments
Labels
Good First Issue Good first issue for new engineers Module: Idea Hub Google Idea Hub module related issues P1 Medium priority Type: Bug Something isn't working
Milestone

Comments

@felixarntz
Copy link
Member

felixarntz commented Aug 30, 2021

Bug Description

Per the original design, the Idea Hub widget tab labels for "Saved" and "Drafts" should only include the number indicator if there are any applicable ideas, i.e. not if there are 0 saved ideas or 0 draft ideas respectively.

This is currently incorrect, as the check for whether to add the indicator is >=0 rather than >0.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The number of ideas on the Idea Hub widget tab labels for saved and draft ideas should only display if the respective value is greater than 0.

Implementation Brief

Test Coverage

  • None.

Visual Regression Changes

  • No changes expected, but if there are VRTs for this component they'll need updating.

QA Brief

Changelog entry

  • Fix counts on Idea Hub widget tab labels to only show up if greater than zero.
@felixarntz felixarntz added Type: Bug Something isn't working P1 Medium priority Module: Idea Hub Google Idea Hub module related issues labels Aug 30, 2021
@felixarntz felixarntz assigned felixarntz and unassigned felixarntz Aug 30, 2021
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Aug 30, 2021
@tofumatt tofumatt added the Good First Issue Good first issue for new engineers label Aug 30, 2021
@tofumatt tofumatt added this to the Sprint 57 milestone Aug 30, 2021
@tofumatt
Copy link
Collaborator

(Technically we could check for ! savedIdeas?.length over savedIdeas?.length === 0 || savedIdeas?.length === undefined, but I find the explicitness of the latter to be a lot more helpful when reading the code—it communicates intent a lot more clearly, so I went with it in the IB.)

@aaemnnosttv aaemnnosttv self-assigned this Aug 31, 2021
@aaemnnosttv
Copy link
Collaborator

IB ✅

@aaemnnosttv aaemnnosttv removed their assignment Aug 31, 2021
@kuasha420 kuasha420 removed their assignment Aug 31, 2021
@felixarntz felixarntz self-assigned this Aug 31, 2021
@felixarntz felixarntz removed their assignment Aug 31, 2021
@wpdarren wpdarren self-assigned this Sep 1, 2021
@wpdarren
Copy link
Collaborator

wpdarren commented Sep 1, 2021

QA Update: ⚠️

@felixarntz @tofumatt is there a reason why we do not have a number on the New Ideas tab when there are ideas? I realise that this is the first tab that is loaded so it's obvious, but when you are on the other tabs, it's not as obvious.

Verified:

There is no longer be (0) in the Draft and Saved tabs of Idea Hub Dashboard Widget if there's no Draft or Saved Ideas

image

There is a number when there is idea in the respective tab.

image

@tofumatt
Copy link
Collaborator

tofumatt commented Sep 1, 2021

Probably because the number will be quite large, but also because they aren't numbers the user is in control of. I think showing the number of new posts isn't very actionable, but the Saved and Drafts column are and indicate the control the user has set aside for themselves.

It makes sense to measure and display those numbers, less so the New Ideas I think.

@felixarntz
Copy link
Member Author

@wpdarren Yes what @tofumatt says is correct - it is the expected behavior that "New" doesn't show any number.

@wpdarren
Copy link
Collaborator

wpdarren commented Sep 2, 2021

QA Update ✅

Verified:

There is no longer be (0) in the Draft and Saved tabs of Idea Hub Dashboard Widget if there's no Draft or Saved Ideas

image

There is a number when there is idea in the respective tab.

image

@wpdarren wpdarren removed their assignment Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good first issue for new engineers Module: Idea Hub Google Idea Hub module related issues P1 Medium priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants