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

Refactor the Page component and its children #39

Merged
merged 3 commits into from
Jun 20, 2018
Merged

Conversation

jimbo
Copy link
Contributor

@jimbo jimbo commented Jun 14, 2018

This PR is a:

[x] New feature
[x] Enhancement/Optimization
[x] Refactor
[x] Bugfix
[ ] Test for existing code
[ ] Documentation

Summary

To accommodate drawers and other top-level elements, the page components needs to be refactored. Also, the introduction of the router broke the navigation, since it was being wired by the App component, which is now defunct.

Additional information

  • This commit uses a new global reducer, app, replacing the old navigation one. It will manage drawer and overlay state.

  • The Header and Footer components have been moved into the Main component. This will preempt some stacking context issues.

  • A mask has been added to the app when a drawer is open. Further masking may be added in the future for a modal dialog component.

@jimbo jimbo requested review from DrewML and zetlen June 14, 2018 23:52
@jimbo jimbo mentioned this pull request Jun 15, 2018
DrewML
DrewML previously approved these changes Jun 15, 2018
@DrewML
Copy link
Contributor

DrewML commented Jun 15, 2018

Nice!

classes: PropTypes.shape({
root: PropTypes.string
}),
openCart: PropTypes.func
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be marked as isRequired since there aren't any safeguards in place. Prevents a refactoring hazard later on

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool. Updated that on all the triggers.

To accommodate drawers and other top-level elements, the page
components needs to be refactored. Also, the introduction of the
router broke the navigation, since it was being wired by the App
component, which is now defunct.

This commit uses a new global reducer, `app`, replacing the old
`navigation` one. It will manage drawer and overlay state.

The header and footer have been moved into the Main component.
This will preempt some stacking context issues.

A mask has been added to the app when a drawer is open. Further
masking may be added in the future for a modal dialog component.
@jimbo jimbo merged commit e9324dd into master Jun 20, 2018
@DrewML
Copy link
Contributor

DrewML commented Jun 21, 2018

Wooohooooooooo

@jcalcaben jcalcaben deleted the jimbo/page-refactor branch July 24, 2018 16:15
fnhipster pushed a commit to PMET-public/pwa-studio that referenced this pull request Apr 9, 2019
* fix: remove buggy sudo-prompt until fallback works.
Fixes magento#35.

 - Added custom prompt for command-line sudo.

* fix: make runAsRoot simpler, prompt mandatory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants