Skip to content

Admin Page: Hide Masterbar toggle for Atomic Sites#8290

Merged
oskosk merged 2 commits intomasterfrom
update/disable-masterbar-atomic
Dec 21, 2017
Merged

Admin Page: Hide Masterbar toggle for Atomic Sites#8290
oskosk merged 2 commits intomasterfrom
update/disable-masterbar-atomic

Conversation

@oskosk
Copy link
Copy Markdown
Contributor

@oskosk oskosk commented Dec 2, 2017

Users of Atomic sites are currently seeing this toggle and being able to interact with it. This results in a weird experience when they try to deactivate the Masterbar as the toggle ends up moving, the page refreshing and the masterbar stays active.

Changes proposed in this Pull Request:

  • Checks if the site is an atomic site and skips rendering the Masterbar settings card if it's the case.

Testing instructions:

  • On an atomic site, with Jetpack Beta, check this PR
  • Confirm that the card is not shown under the Writing tab.

Screenshot

image

image

Proposed changelog entry for your changes:

Hide the Master bar settings card for Atomic Sites.

@oskosk oskosk added Admin Page React-powered dashboard under the Jetpack menu [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Status] Needs Review This PR is ready for review. Bug When a feature is broken and / or not performing as intended labels Dec 2, 2017
@oskosk oskosk requested a review from a team as a code owner December 2, 2017 22:36
@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 4, 2017

@vindl how do you feel about this change ?

cc @jeherve

@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 4, 2017

Also cc @dereksmart

Copy link
Copy Markdown
Member

@vindl vindl left a comment

Choose a reason for hiding this comment

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

@vindl how do you feel about this change?

I think this is a reasonable thing to do. Also the code LGTM! 👍

@vindl
Copy link
Copy Markdown
Member

vindl commented Dec 5, 2017

After some more thought, instead of disabling the toggle I think it would be even better if we removed the card completely.

@jeherve
Copy link
Copy Markdown
Member

jeherve commented Dec 5, 2017

instead of disabling the toggle I think it would be even better if we removed the card completely.

I would agree.

@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 5, 2017

Self-note: Maybe it would be best to check if the available module is there instead of checking for atomic site.

@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 5, 2017

@vindl @jeherve I think removing the settings card as a whole would demand more work in other pieces of the code than the PR that's already done. Don't know if I can do it for today's release though.

@oskosk oskosk added the [Status] Needs Design Review Design has been added. Needs a review! label Dec 5, 2017
@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 5, 2017

@MichaelArestad what do you think about this ?

@MichaelArestad
Copy link
Copy Markdown
Contributor

I was just having this conversation in parallel with other folks. I would remove the Masterbar card altogether for now unless @apeatling has any objections.

@vindl
Copy link
Copy Markdown
Member

vindl commented Dec 7, 2017

@vindl @jeherve I think removing the settings card as a whole would demand more work in other pieces of the code than the PR that's already done. Don't know if I can do it for today's release though.

We should be able to keep all the changes contained in this file by bailing early in render:

if ( isAtomicSite ) {
    return null;
}

or

{ ! isAtomicSite && <SettingsCard ... }

@oskosk oskosk force-pushed the update/disable-masterbar-atomic branch from a3ab14f to ff3b450 Compare December 21, 2017 13:48
@oskosk oskosk changed the title Admin Page: Disable Masterbar toggle for Atomic Sites Admin Page: Hide Masterbar toggle for Atomic Sites Dec 21, 2017
@oskosk oskosk force-pushed the update/disable-masterbar-atomic branch from ff3b450 to aa370a9 Compare December 21, 2017 13:53
@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 21, 2017

Thanks for the feedback folks. I've addressed the requested changes. Will check in an Atomic site when the PR is available in Jetpack Beta Plugin. Merging afterwards if everything's ok!

Copy link
Copy Markdown
Member

@vindl vindl left a comment

Choose a reason for hiding this comment

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

New changes LGTM! :shipit:

@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Dec 21, 2017

Thanks @vindl . I've just checked in an Atomic Site. Merging now!

@oskosk oskosk added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Design Review Design has been added. Needs a review! [Status] Needs Review This PR is ready for review. labels Dec 21, 2017
@oskosk oskosk merged commit d0c8ef3 into master Dec 21, 2017
@oskosk oskosk added this to the 5.7 milestone Dec 21, 2017
@oskosk oskosk deleted the update/disable-masterbar-atomic branch December 22, 2017 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu Bug When a feature is broken and / or not performing as intended [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants