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

Simplify in-progress state when submitting User Input answers. #6381

Merged

Conversation

sashadoes
Copy link
Collaborator

@sashadoes sashadoes commented Jan 6, 2023

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 5.6.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

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

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Size Change: +565 B (0%)

Total Size: 1.23 MB

Filename Size Change
./dist/assets/js/googlesitekit-activation-********************.js 26.8 kB -1 B (0%)
./dist/assets/js/googlesitekit-api-********************.js 9.45 kB +2 B (0%)
./dist/assets/js/googlesitekit-components-gm2-********************.js 5.82 kB +1 B (0%)
./dist/assets/js/googlesitekit-components-gm3-********************.js 9.8 kB +1 B (0%)
./dist/assets/js/googlesitekit-datastore-forms-********************.js 9.14 kB +1 B (0%)
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.08 kB -1 B (0%)
./dist/assets/js/googlesitekit-datastore-site-********************.js 15.3 kB -3 B (0%)
./dist/assets/js/googlesitekit-datastore-ui-********************.js 9.25 kB +3 B (0%)
./dist/assets/js/googlesitekit-datastore-user-********************.js 21.6 kB -2 B (0%)
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 63.6 kB +30 B (0%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 69.6 kB +42 B (0%)
./dist/assets/js/googlesitekit-modules-********************.js 20.2 kB +5 B (0%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 70.4 kB +8 B (0%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 19.8 kB -1 B (0%)
./dist/assets/js/googlesitekit-modules-analytics-********************.js 71.4 kB +3 B (0%)
./dist/assets/js/googlesitekit-modules-optimize-********************.js 18.8 kB +1 B (0%)
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 21.3 kB +1 B (0%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 39.2 kB +9 B (0%)
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 31.8 kB +4 B (0%)
./dist/assets/js/googlesitekit-settings-********************.js 50.3 kB +275 B (+1%)
./dist/assets/js/googlesitekit-splash-********************.js 69.1 kB -1 B (0%)
./dist/assets/js/googlesitekit-user-input-********************.js 43.4 kB +170 B (0%)
./dist/assets/js/googlesitekit-vendor-********************.js 332 kB +11 B (0%)
./dist/assets/js/googlesitekit-widgets-********************.js 15.7 kB -3 B (0%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 60 kB +10 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-admin-css-********************.min.css 47.7 kB
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.1 kB
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 7.27 kB
./dist/assets/js/29-********************.js 2.8 kB
./dist/assets/js/30-********************.js 2.28 kB
./dist/assets/js/31-********************.js 3.72 kB
./dist/assets/js/32-********************.js 3.12 kB
./dist/assets/js/analytics-advanced-tracking-********************.js 769 B
./dist/assets/js/googlesitekit-adminbar-********************.js 35.5 kB
./dist/assets/js/googlesitekit-data-********************.js 2.15 kB
./dist/assets/js/googlesitekit-i18n-********************.js 3.92 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 378 B
./dist/assets/js/runtime-********************.js 1.26 kB

compressed-size-action

Copy link
Collaborator

@hussain-t hussain-t left a comment

Choose a reason for hiding this comment

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

Thanks, @sashadoes. The changes LGTM. However, I did a bit of testing and found the What are your top goals for this site? section’s checkboxes are editable (not disabled). Ideally, I think the Edit link should be disabled, and we shouldn’t let the users edit while submitting. WDYT?

Screen.Recording.2023-01-11.at.4.08.51.PM.mov

cc: @aaemnnosttv

@sashadoes
Copy link
Collaborator Author

@hussain-t thanks for the review and feedback. I made an update.

@sashadoes sashadoes requested a review from hussain-t January 11, 2023 17:52
Copy link
Collaborator

@hussain-t hussain-t left a comment

Choose a reason for hiding this comment

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

Thanks, @sashadoes. LGTM 👍

Copy link
Collaborator

@eugene-manuilov eugene-manuilov left a comment

Choose a reason for hiding this comment

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

Thanks, @sashadoes. Mostly looks good to me. Added two comments for you. Please, take a look.

>
{ __( 'Save', 'google-site-kit' ) }
{ isScreenLoading && (
<Spinner isSaving={ isScreenLoading } />
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have the SpinnerButton component for this purposes. Could you please update this component to use it instead?

@@ -30,7 +35,7 @@ import { CORE_LOCATION } from '../../googlesitekit/datastore/location/constants'
import Link from '../Link';
const { useSelect, useDispatch } = Data;

export default function CancelUserInputButton() {
export default function CancelUserInputButton( { disabled = false } ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The default state for the disabled property is undefined. Let's stick with it:

Suggested change
export default function CancelUserInputButton( { disabled = false } ) {
export default function CancelUserInputButton( { disabled } ) {

Copy link
Collaborator

@eugene-manuilov eugene-manuilov left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@eugene-manuilov eugene-manuilov left a comment

Choose a reason for hiding this comment

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

Actually, just noticed that this PR has merge conflicts. @sashadoes, could you please resolve all merge conflicts?

Copy link
Collaborator

@eugene-manuilov eugene-manuilov left a comment

Choose a reason for hiding this comment

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

Looks good now

@eugene-manuilov eugene-manuilov merged commit 387f86f into develop Jan 13, 2023
@eugene-manuilov eugene-manuilov deleted the enhancement/6323-simplify-submitting-user-input branch January 13, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants