Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Update TaskList design #4434

Merged
merged 22 commits into from
May 27, 2020
Merged

Update TaskList design #4434

merged 22 commits into from
May 27, 2020

Conversation

jeffstieler
Copy link
Contributor

Fixes #4096.

This PR seeks to update the appearance and functionality of the <TaskList /> component by:

  • Use checkmarks for list icons
  • Add a progress bar
  • Show time estimates for tasks
  • Remove TaskList upon completion
  • Don't show TaskList on Analytics Overview (when homepage feature enabled)

Another change made in this PR is to not use the <TaskListPlaceholder /> when the options are being requested as it causes the placeholder to show in cases where the task list isn't displayed. This is an improvement for those cases, but perhaps makes the scenarios where the task list is displayed more jarring, as it "just appears" on fast connections (the placeholder is just for Suspense now).

I'm open to reverting that change for sure.

Accessibility

Screenshots

Screen Shot 2020-05-22 at 8 59 02 AM

@jameskoster does this look OK? ☝️

Detailed test instructions:

  • Start a dev build (so homepage feature is enabled)
  • Verify the design of the TaskList on the home screen
  • Verify functions of all steps
  • Verify "hide" functionality
  • Clear "hidden" option
  • Complete all tasks
  • Verify task list auto-dismisses
  • Reset task list completion options
  • Start a prod build (so homepage feature is disabled)
  • Verify the design of the TaskList on the home screen
  • Verify functions of all steps
  • Verify "hide" functionality

Changelog Note:

Tweak: update design of store setup task list.

@jeffstieler jeffstieler added type: enhancement The issue is a request for an enhancement. [Status] Needs Review focus: home screen Issues around the new home screen feature labels May 22, 2020
@jeffstieler jeffstieler requested a review from a team May 22, 2020 16:43
const isTaskListEnabled =
isOnboardingEnabled() &&
! taskListHidden &&
! window.wcAdminFeatures.homepage;
Copy link
Contributor

Choose a reason for hiding this comment

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

@jeffstieler if #4418 is merged first this should be updated to ! getFeatureFlag( 'homepage' );

@jameskoster
Copy link
Member

Opened a PR on this here.

A couple of small things I didn't get to:

  • I noticed the card header size differs slightly from the quick links. Is it possible to use the Text component (title small) for these?
  • On that note, are we using the Text component for all instances of text here? The sooner we can adopt that, the sooner our UI will start to feel more cohesive :)
  • In the hide menu I'm seeing a focus state that I probably shouldn't be upon open. Also, the menu item there should fill the width of the container.

So cool to see this coming together - it's looking really good! :D

Copy link
Collaborator

@psealock psealock left a comment

Choose a reason for hiding this comment

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

I'm open to reverting that change for sure.

The task list looks weird just appearing. It looks like it depends on two options woocommerce_task_list_complete and woocommerce_task_list_hidden, but only the later is preloaded. Should we preload them both?

@@ -311,7 +314,7 @@ class CustomizableDashboard extends Component {
<Fragment>
{ isTaskListEnabled && (
<Suspense fallback={ <Spinner /> }>
<TaskList query={ query } inline={ isDashboardShown } />
Copy link
Collaborator

Choose a reason for hiding this comment

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

unrelated nit: Maybe rename isDashboardShown to isTaskListEnabled so it matches the use Home page


/**
* WooCommerce dependencies
*/
import { Card, List, MenuItem, EllipsisMenu } from '@woocommerce/components';
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

label={ __( 'Task List Options', 'woocommerce-admin' ) }
renderContent={ () => (
<div className="woocommerce-task-card__section-controls">
<Button onClick={ () => this.hideTaskCard( 'remove_card' ) }>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Another unrelated comment: It always bugged me that clicking this didn't cause the task list to disappear immediately or at least show a spinner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK to handle this in a follow up?

client/task-list/style.scss Outdated Show resolved Hide resolved
'Purchase, install, and manage your extensions directly from your dashboard',
'wooocommerce-admin'
),
icon: 'extension',
container: null,
onClick: () =>
remainingProductIds.length ? toggleCartModal() : null,
visible: productIds.length,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Clicking "Purchase & install extensions" doesn't do anything for me. Maybe this should be visible: remainingProductIds.length?

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 think it's functioning correctly (this is unchanged in the PR) - is it showing complete? If you selected a plugin and have it installed, the step will display as completed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, maybe it because I'm doing odd things like const isTaskListEnabled = true; hard coded to get it to come up.

window.location = getAdminLink(
'admin.php?page=wc-admin&reset_profiler=1'
);
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps good for a follow up: We should use <Link /> component with these list items. This onClick causes a page refresh where one isn't required. Clicking "Store details" should not refresh the page. Secondarily, it removes the "preview" address in the lower right hand side which is useful.

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'd definitely like to tackle this in a follow up - at a guess, this is likely to be more involved than changing to a link component since we're potentially going to need to reset the "completed" flag for the task list (and think through the impact to tracking of that completion).

@psealock psealock added needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. and removed [Status] Needs Review labels May 25, 2020
* Colors

* Only show time estimation for incomplete tasks

* Don't show chevron on completed tasks.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
@jeffstieler
Copy link
Contributor Author

The task list looks weird just appearing. It looks like it depends on two options woocommerce_task_list_complete and woocommerce_task_list_hidden, but only the later is preloaded. Should we preload them both?

Reworked in 98b8aa9.

@jeffstieler jeffstieler added [Status] Needs Review and removed needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. labels May 25, 2020
Copy link
Collaborator

@psealock psealock left a comment

Choose a reason for hiding this comment

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

Reworked in 98b8aa9.

It still makes a request, even though both options are preloaded. In https://a8c.slack.com/archives/C9K5T0XSP/p1590452504044500?thread_ts=1590435699.034400&cid=C9K5T0XSP we discovered that hydration isn't working as expected with lazy loaded components. Maybe thats happening here.

Everything is looking good to me, just a prop type violation and the rest to be addressed in follow ups.

/**
* If the task list has been completed.
*/
taskListComplete: PropTypes.bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Theres a proptype violation here, "Invalid prop taskListComplete of type string supplied to Layout, expected boolean." I found it when the task list wasn't visible.

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'm unable to reproduce this - can you provide steps?

'Purchase, install, and manage your extensions directly from your dashboard',
'wooocommerce-admin'
),
icon: 'extension',
container: null,
onClick: () =>
remainingProductIds.length ? toggleCartModal() : null,
visible: productIds.length,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, maybe it because I'm doing odd things like const isTaskListEnabled = true; hard coded to get it to come up.

@jeffstieler jeffstieler merged commit 43cd1a1 into master May 27, 2020
@jeffstieler jeffstieler deleted the update/4096-task-list-design branch May 27, 2020 16:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: home screen Issues around the new home screen feature type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Onboarding Task List changes - home screen
4 participants