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

Removed "Updated every 2-3 days" language from Idea Hub Saved and Drafts tabs #3832

Closed
mxbclang opened this issue Aug 11, 2021 · 4 comments
Closed
Labels
Module: Idea Hub Google Idea Hub module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature
Milestone

Comments

@mxbclang
Copy link

mxbclang commented Aug 11, 2021

Bug Description

The "Updated every 2-3 days" language currently displays on all three IH tabs on the Dashboard: New, Saved, and Drafts. It should be removed from the Saved and Drafts tabs so it only displays on the New tab.

Screenshots

image


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

Acceptance criteria

  • The "Updated every 2-3 days" copy in the Idea Hub widget should only appear when in the "New" tab.

Implementation Brief

  • Add a new optional prop, footerText, to the DashboardIdeasWidget Footer component (assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/Footer.js).
  • Add the new prop with type string to the propTypes definition for the component.
  • Inside the footer component, add a conditional:
    • if the footerText prop has been provided, render the current <Grid>, <Row> and <Cell> output, the sole difference being to replace the 'Updated every 2-3 days' text with output of the new prop.
    • if it is NOT provided, render the <Pagination> component inside a straightforward <div> instead (with the googlesitekit-idea-hub__footer className applied).
  • Now, inside the index component, pass the 'Updated every 2-3 days' string as the footerText prop to the Footer component only if the activeTab is new-ideas.

Test Coverage

  • This shouldn't require any new tests.

Visual Regression Changes

  • It's possible that VRT images that deal with the widget may need updating.

QA Brief

  • Set up Site Kit with Idea Hub enabled and connected.
  • Go to the Dashboard Ideas widget
  • Observe the footer, while cycling through the 'new', 'saved' and 'drafts' tabs, and verify that the Updated every 2-3 days language is only visible in the new tab.

Changelog entry

  • Update the IdeaHub widget to display the "Updated every 2-3 days" message only for the new ideas tab.
@mxbclang mxbclang added the Module: Idea Hub Google Idea Hub module related issues label Aug 11, 2021
@felixarntz felixarntz self-assigned this Aug 11, 2021
@felixarntz felixarntz added P1 Medium priority Type: Enhancement Improvement of an existing feature labels Aug 11, 2021
@felixarntz felixarntz removed their assignment Aug 11, 2021
@eugene-manuilov
Copy link
Collaborator

  • if it is NOT provided, render the <Pagination> component inside a straightforward <div> instead (with the googlesitekit-idea-hub__footer className applied).

@johnPhillips we need to make sure that the Pagination component is right-aligned to be consistent across all tabs.

@johnPhillips
Copy link
Contributor

@eugene-manuilov I did address this (although it's not obvious from the IB!).

If we simply remove the <Cell> with the '2-3 days' content but leave the remaining Grid > Row > Cell > Pagination structure, then the Pagination is left-aligned. I did look, but I couldn't find an MDC grid option to make it align-right.

However, when the <Pagination> is rendered inside a simple div.googlesitekit-idea-hub__footer, its justify-content: flex-end; comes into effect. This makes it right-aligned and also loses us three wrapper divs, which is always nice :-)

<Grid> with both <Cell> elements <Grid> with single <Cell> Using <div>
Screenshot 2021-08-13 at 09 33 12 Screenshot 2021-08-13 at 09 38 31 Screenshot 2021-08-13 at 09 33 30

Let me know what you think.

@eugene-manuilov
Copy link
Collaborator

Ah... ok, then it sounds good to me. Thanks, @johnPhillips. IB ✔️

@wpdarren
Copy link
Collaborator

wpdarren commented Aug 19, 2021

QA Update: ✅

I can confirm that the Updated every 2-3 days language is only visible on the new tab. Screenshot 1 - Screenshot 2

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Idea Hub Google Idea Hub module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants