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

Show DomainNotice in the all domains list #43849

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

hambai
Copy link
Contributor

@hambai hambai commented Jul 1, 2020

Changes proposed in this Pull Request

  • Show a DomainNotice in the all domains list
  • Highlight rows with expiring/expired domains

I decided to move the status resolving in a separate helper function so that we have consistency across different domain presentations (list vs status page).

Here's how it looks:
Screenshot 2020-07-02 at 1 45 47
Screenshot 2020-07-02 at 1 46 04

Testing instructions

  • Open /domains/manage and verify that the notices for expiring/expired/activating domains are rendered. Also verify that the rows are highlighted with 3px left border.

Fixes #

@hambai hambai added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature Group] Emails & Domains Features related to email integrations and domain management. labels Jul 1, 2020
@hambai hambai requested a review from a team July 1, 2020 22:48
@hambai hambai self-assigned this Jul 1, 2020
@matticbot
Copy link
Contributor

statusText: translate( 'Action required' ),
statusClass: 'status-error',
icon: 'info',
listStatusText: translate( 'Expired %(timeSinceExpiry)s', {
Copy link

Choose a reason for hiding this comment

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

ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 29 times:
translate( 'Expired %(timeSinceExpiry)s', { context: 'timeSinceExpiry is of the form "[number] [time-period] ago" e.g. "3 days ago"'} ) ES Score: 12
See 2 additional suggestions in the PR translation status page

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~163 bytes added 📈 [gzipped])

name     parsed_size           gzip_size
domains       +790 B  (+0.1%)     +163 B  (+0.1%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

import { hasPendingGSuiteUsers } from 'lib/gsuite';
import { shouldRenderExpiringCreditCard } from 'lib/purchases';

export function resolveDomainStatus(
Copy link
Contributor

@olaseni olaseni Jul 2, 2020

Choose a reason for hiding this comment

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

This is nice 👍. I like how you have extracted all the similarly named functions that "resolve status" for different domain types, and have integrated it into one function that works for all types. It is no doubt neater.

However in this PR, or a subsequent one, I think we should further extract the cases into different functions in this file to make the case statements easier to read and decipher at a glance.

Copy link
Contributor

@olaseni olaseni left a comment

Choose a reason for hiding this comment

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

Works good!

@eltongo eltongo merged commit 1f8786f into master Jul 6, 2020
@eltongo eltongo deleted the add/domain-status-in-all-domains-list branch July 6, 2020 13:40
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 6, 2020
@a8ci18n
Copy link

a8ci18n commented Jul 6, 2020

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/4014094

Thank you @hambai for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Jul 16, 2020

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants