-
Notifications
You must be signed in to change notification settings - Fork 179
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(app): Standardize modals and pages #1705
Conversation
} | ||
export default function PageWrapper (props: Props) { | ||
return ( | ||
<main className={styles.relative}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably only have one <main>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, oversight on my part
app/src/components/Page/styles.css
Outdated
} | ||
|
||
.task { | ||
flex: 1 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this flex
rule necessary now that the parent of the <Page>
is not display: flex
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will test and see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed for the splash
app/src/pages/Calibrate/Labware.js
Outdated
{!deckPopulated && ( | ||
<ReviewDeckModal slot={slot} /> | ||
)} | ||
<PageWrapper> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than import <PageWrapper>
into every single page, we should import it into App.js
and wrap the <Switch>
there with it. We can replace these PageWrapper
s with React.Fragment
s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Codecov Report
@@ Coverage Diff @@
## edge #1705 +/- ##
==========================================
- Coverage 34.91% 33.65% -1.27%
==========================================
Files 339 349 +10
Lines 5553 5782 +229
==========================================
+ Hits 1939 1946 +7
- Misses 3614 3836 +222
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛱
} | ||
|
||
type Props = ContextRouter & StateProps | ||
type DispatchProps = {onBackClick: () => void} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use () => mixed
and you don't need curly braces below
return { | ||
deckPopulated: !!robotSelectors.getDeckPopulated(state) | ||
onBackClick: () => { dispatch(push(url)) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above about () => mixed
overview
This PR is a much more sane attempt at streamlining pages, modals and scroll behavior. Modals are now siblings of the page within a PageWrapper component (position relative).
changelog
review requests
Pleas make sure everything renders and behaves as expected.
This was another crazy one, so please keep an eye out for anything that slipped through the cracks or could be better.