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

fix: Fix automatic sort of Composite items in fixed containers #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EricRibeiro
Copy link
Member

Closes #46

How to test?

Does this PR introduce breaking changes?

No

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 75dd95b:

Sandbox Source
Reakit Configuration
xenodochial-wildflower-dcuvh Issue #46

@RonanFelipe
Copy link

Thanks for working on this @EricRibeiro! I'll take a look at it this weekend (hopefully).

@github-actions
Copy link

Size Change: 0 B

Total Size: 257 kB

ℹ️ View Unchanged
Filename Size Change
packages/reakit-playground/dist/reakit-playground.min.js 187 kB 0 B
packages/reakit-system-bootstrap/dist/reakit-system-bootstrap.min.js 19.1 kB 0 B
packages/reakit-system-palette/dist/reakit-system-palette.min.js 8.85 kB 0 B
packages/reakit-system/dist/reakit-system.min.js 2.45 kB 0 B
packages/reakit-utils/dist/reakit-utils.min.js 3.46 kB 0 B
packages/reakit/dist/reakit.min.js 36 kB 0 B

compressed-size-action

@mairieli
Copy link
Collaborator

I'm also hitting this issue on a regular basis, it can be quite jarring on a long page – thanks for taking on the fix!

@codecov
Copy link

codecov bot commented Apr 17, 2021

Codecov Report

Merging #47 (1fb2103) into master (c1fa3dc) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 1fb2103 differs from pull request most recent head 75dd95b. Consider uploading reports for the commit 75dd95b to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   95.12%   95.12%           
=======================================
  Files         230      230           
  Lines        3509     3509           
  Branches      955      955           
=======================================
  Hits         3338     3338           
  Misses        170      170           
  Partials        1        1           
Impacted Files Coverage Δ
...src/Composite/__utils/useSortBasedOnDOMPosition.ts 54.54% <100.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 c1fa3dc...75dd95b. Read the comment docs.

@@ -5,7 +5,7 @@ import { Item } from "./types";

type SetItems = (items: Item[]) => void;

function setItemsBasedOnDOMPosition(items: Item[], setItems: SetItems) {
function mutateItemsBasedOnDOMPosition(items: Item[], setItems: SetItems) {

Choose a reason for hiding this comment

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

What is the reasoning behind the mutate name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composite automatic sort doesn't work on fixed containers
3 participants