Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Sortable panels #229

Merged
merged 10 commits into from
Jan 18, 2019
Merged

Sortable panels #229

merged 10 commits into from
Jan 18, 2019

Conversation

bryfox
Copy link
Contributor

@bryfox bryfox commented Jan 11, 2019

This PR makes the grid items on a workspace draggable and sortable so that a user can configure chart positions. The order is stored & persisted with redux state, separately from excluded chart preferences.

This depends on #228, which is still under review.

Known issue: text on panels is no longer selectable. I was considering merging the counts & stats panels, and having the three text-heavy panels in an undraggable (and text-selectable) top row. We could instead have some sort of drag handle on each panel, or toggle a 'dragging' mode if needed.

dragging

@bryfox bryfox requested a review from jthrilly January 11, 2019 22:00
@bryfox bryfox changed the title [WIP] Sortable panels [Merge after #228] Sortable panels Jan 15, 2019
@jthrilly
Copy link
Member

How about we combine this with another small visual tweak I was going to suggest in 228, and enlarge the colored accent and make it the drag handle?

@bryfox bryfox changed the title [Merge after #228] Sortable panels Sortable panels Jan 17, 2019
@bryfox bryfox changed the base branch from feature/multiple-charts to master January 17, 2019 16:44
Uses react-sortable-hoc, which was already included for the Filter UI.

`withAnswerDistributionCharts.js` is largely a move of
`AnswerDistributionPanels.js`. In order to manage sorting, we
work with the underlying array, rather than directly rendering
the dynamically-created panels.

WorkspaceScreen now relies on the HOCs to provide its [shared] data:
sessions first, then the answer distribution charts.
API logging is getting noisier; probably will not be needed outside
development.
@bryfox
Copy link
Contributor Author

bryfox commented Jan 17, 2019

I rebased this onto master & pushed the drag handle change. The handles don't particularly look draggable until hover, but that might be fine for this feature.

@jthrilly jthrilly merged commit 259102d into master Jan 18, 2019
@bryfox bryfox deleted the feature/sortable-panels branch January 18, 2019 18:47
jthrilly added a commit that referenced this pull request Jul 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants