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

Release/v2.1.0 #880

merged 25 commits into from Jul 12, 2020

Release/v2.1.0 #880

merged 25 commits into from Jul 12, 2020


Copy link

@mlaursen mlaursen commented Jul 9, 2020

Raising Dark Mode Elevation

This release is targeted towards creating a better dark mode theme by implementing the full dark theme specs from material design. Just in case this page disappears in the future, basically the idea is to use a base dark background color (#121212) and apply a white overlay with specific opacities depending on the current elevation.

To ensure backwards compatibility, the new dark theme will need to be opted-in by setting the new variable $rmd-theme-dark-elevation: true;. You can also check out the all elevations demo with the dark theme enabled on the documentation site to see how this all works.

Current Dark Theme


Improved Dark Theme with Elevation


AutoComplete partial support for non-searchable items

The AutoComplete was updated to have two new props: beforeResultsChildren and afterResultsChildren which can be used to add additional content into the listbox before or after matches. This will probably need to be redone in a better way in the future though.

Bug Fixes

Added a few bug fixes in the @react-md/tree package for keyboard focus behavior, the dist/scssVariables.js correctly setting booleans to false instead of always considering them true, and sandboxes to just use the latest react-md package version instead.

mlaursen added 10 commits Jul 9, 2020
Since it can sometimes be helpful to render additional items that are
not searchable and mostly for presentation, the AutoComplete was updated
to have `beforeResultsChildren` and `afterResultsChildren` props. The
`afterResultsChildren` prop is good to use for fetching additional
results for paginated auto completion.
This isn't really documented, but might be helpful for different
situations if the AutoComplete component doesn't meet your needs.

This should have probably been the default to start with instead of
`initial`. It became more of a problem once I started implementing the
"Dark theme elevation" feature.
I forgot that `Boolean(variable)` only checks if something is considered
truthy and does not convert the string "false" to false.
Copy link

codecov-commenter commented Jul 9, 2020

Codecov Report

Merging #880 into master will decrease coverage by 0.23%.
The diff coverage is 36.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #880      +/-   ##
- Coverage   88.65%   88.41%   -0.24%     
  Files         238      239       +1     
  Lines        6811     6855      +44     
  Branches     1730     1746      +16     
+ Hits         6038     6061      +23     
- Misses        698      719      +21     
  Partials       75       75              
Impacted Files Coverage Δ
packages/autocomplete/src/useAutoComplete.ts 83.33% <ø> (ø)
packages/tabs/src/TabPanels.tsx 87.09% <ø> (ø)
packages/tree/src/useTreeMovement.ts 21.79% <0.00%> (-2.50%) ⬇️
packages/utils/src/sizing/AppSizeListener.tsx 96.87% <ø> (ø)
packages/utils/src/wia-aria/movement/utils.ts 100.00% <ø> (ø)
packages/tree/src/useFlattenedTreeList.ts 82.60% <50.00%> (-3.44%) ⬇️
packages/autocomplete/src/AutoComplete.tsx 97.91% <100.00%> (+0.04%) ⬆️
packages/list/src/SimpleListItem.tsx 100.00% <100.00%> (ø)
packages/utils/src/wia-aria/focusElementWithin.ts 100.00% <100.00%> (ø)
packages/utils/src/scrollIntoView.ts 78.57% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56cda1f...b0cb9ea. Read the comment docs.

mlaursen added 12 commits Jul 10, 2020
I'll need to look into a better way to handle the version since the
packages don't always version bump at the same time.
This is actually pretty helpful since you'll be able to tell at
a glance when a new feature was added. I think I'll start doing
this going forward.
I forgot I had an additional wrapper for the alert demos
so the sandboxes failed since they referenced the original
demo name instead of Demo.
This new color appears to work nicely on the normal
background color and react-md elevated elements like
cards so it seems like a more sensible default.
It looks like using element.focus() doesn't always scroll the element
into view if a parent element has scrolling enabled. This caused a
problem with large dropdown menus and using the ArrowUp key to trigger
the menu that would not have the current element visible until the
ArrowUp key was pressed again.
The tree will now correctly scroll the active item into view when using
the left and right arrow keys to jump to the expandable parent with the
left arrow key or to the first child with the right arrow key.
The tree will now correctly not consider items visible if the direct
parent is expanded, but a parent above is closed.
This doesn't really fix it 100% since I need to also scroll the item
back into view after the expansion occurs. I probably need to redo the
tree movement for that to work though.
I've been running into problems with publishing with a ZLib error. The
new release script won't push stuff up unless the release was fully
successful since I've been having to clean up these errors by:

- `git reset HEAD^`
- `git checkout .`
- `git push --force`
- `git tag -d v{{CURRENT_VERSION}}`
- `git push origin :v{{CURRENT_VERSION}}`

and then trying the release again. It seems like it's just `yarn` that
is completely broken for this though since `npx lerna publish` was
working so I'll try doing `npm run release` going forward.
mlaursen added 3 commits Jul 11, 2020
The ListItem will now correctly apply the disabled states as needed and
also prevent the item from being clicked while disabled.
@mlaursen mlaursen merged commit 989d0f3 into master Jul 12, 2020
3 of 5 checks passed
@mlaursen mlaursen deleted the release/v2.1.0 branch Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants