feat(app): allow app update pop-up notifications to be disabled#6715
feat(app): allow app update pop-up notifications to be disabled#6715mcous merged 2 commits intohotfix_3.21.1from
Conversation
sfoster1
left a comment
There was a problem hiding this comment.
Tested what's in the PR mesage, LGTM
6715d41 to
c7e8e66
Compare
|
Reviewed with product and UX and requested changes have been made:
This PR is good to review for final approval |
| return { wrapper, store } | ||
| // force a re-render by returning a new state to recalculate selectors | ||
| // and sending a blank set of new props to the wrapper | ||
| const refresh = maybeNextState => { |
There was a problem hiding this comment.
We do this all the time, so I figured I would add this into our mountWithStore helper. If we want to re-render a connected component to test how the UI reacts to state changes, we run into two problems:
- Obviously, we have to tell enzyme to rerender the component
- We have to convince any
useSelector's to recalculate
This refresh helper does this by:
- Calling the awkward
wrapper.setProps({})for us - Telling the
getStatemock to return a new object, which will telluseSelectorto recalculate (after the react-redux upgrade included in refactor(app): trigger UpdateAppModal based on state.alerts #6708)
someSelector.mockReturnValue('foo')
const { wrapper, refresh } = mountWithStore(...)
expect(wrapper.exists(SomeComponent)).toBe(false)
someSelector.mockReturnValue('bar')
refresh()
expect(wrapper.exists(SomeComponent)).toBe(true)| export const FONT_SIZE_CAPTION = '0.625rem' | ||
| export const FONT_SIZE_TINY = '0.325rem' | ||
| export const FONT_SIZE_MICRO = '0.2rem' | ||
| export const FONT_SIZE_INHERIT = 'inherit' |
There was a problem hiding this comment.
I added this just to be consistent, but I think of all the primitives stuff, these non-scale constants are the most tedious. I'd like to explore some or all of the following options:
- Move common CSS constants to deduplicated vars rather than having a bunch of different ones depending on the property
e.g.we only need one const forauto, one foreinherit, etc.
- Figure out if we can incorporate csstype into our style props
- Might remove the need for most of our explicitly defined constants
There was a problem hiding this comment.
Incorporating csstype sounds like a great idea. Maintaining our own explicitly defined constants has never felt sound or odor-less. It also makes for massive imports at the top of component files.
| export const C_BLUE = '#006fff' | ||
|
|
||
| // colors by usage | ||
| export const COLOR_DISABLED = '#9c9c9c' |
There was a problem hiding this comment.
Was not used anywhere I could find
| backgroundColor: Styles.C_WHITE, | ||
| position: Styles.POSITION_RELATIVE, | ||
| overflowY: Styles.OVERFLOW_AUTO, | ||
| maxWidth: Styles.SIZE_6, |
There was a problem hiding this comment.
Realized the maxWidth was inappropriate to apply on the BaseModal. BaseModal will now stretch to 100% width of relative parent by default
Codecov Report
@@ Coverage Diff @@
## hotfix_3.21.1 #6715 +/- ##
================================================
Coverage ? 80.23%
================================================
Files ? 240
Lines ? 20813
Branches ? 0
================================================
Hits ? 16700
Misses ? 4113
Partials ? 0
Continue to review full report at Codecov.
|
|
Finished smoke testing with a "production" app and checked off the boxes in the test plan. Found one issue where "Turn off app update notifications" was showing up in the modal when it shouldn't have, and added a unit test + fix to the PR accordingly |
overview
This PR adds the ability for a user to disable app update pop-up notifications either via the pop-up or via a toggle in More > App > App Software Settings.
Closes #6684
This is a draft PR blocked by #6708. Will require rebase.changelog
review requests
The acceptance criteria are in #6684, so take a look at that. As usual, manually editing
versioninapp-shell/package.jsonto a previous version is the best way to test this withmake -C app-shell devrisk assessment
Medium risk. Mitigating factors: