Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Sortable Resource List #1098

Merged
merged 24 commits into from
Dec 18, 2018
Merged

Sortable Resource List #1098

merged 24 commits into from
Dec 18, 2018

Conversation

francocorreasosa
Copy link
Contributor

@francocorreasosa francocorreasosa commented Nov 19, 2018

Now, the sortable prop can be used to make the list sortable by dragging and dropping items. You will need to implement the onSortEnd method in order to reorder the items using the provided arrayMove

kapture 2018-12-04 at 18 22 31

@francocorreasosa francocorreasosa added the ✋don't merge PRs that are blocked / paused at the moment label Nov 19, 2018
@francocorreasosa francocorreasosa removed the ✋don't merge PRs that are blocked / paused at the moment label Nov 23, 2018
@francocorreasosa francocorreasosa changed the title WIP: Sortable Resource List Sortable Resource List Nov 23, 2018
Copy link
Contributor

@andresgalante andresgalante left a comment

Choose a reason for hiding this comment

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

@francocorreasosa I build it and it moves :) As far as the code goes I can't really review it, I'd just make sure that actions and links work when they are clicked.

@landitus I think there is a need for some kind of indication that the list is sortable. If we can't add new elements because we need to match the style guide, I suggest we at least change the cursor to cursor: move.

Copy link
Contributor

@landitus landitus left a comment

Choose a reason for hiding this comment

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

@francocorreasosa Let me mockup the design with the necessary handles that will indicate this List can be re-ordered via drag and drop. I will place it here so you can continue.

@francocorreasosa
Copy link
Contributor Author

Sounds good @landitus, thank you

@francocorreasosa francocorreasosa added 👨‍🎨design needed Information is required from the design team 🚀 release: minor new features and non-breaking changes labels Nov 27, 2018
@andresgalante
Copy link
Contributor

@francocorreasosa When @landitus is done with the design please let me know, positioning them can be a challenge and we might do a larger refactor on the resource list to make it accessible, improve the HTML and the CSS while we are it. It might take a little bit more time, but its nothing we can't solve together in a day or 2. What do you think?

@francocorreasosa
Copy link
Contributor Author

Sounds like a good idea @andresgalante, let's start planning that as soon as we merge this

@landitus
Copy link
Contributor

landitus commented Nov 30, 2018

@francocorreasosa Here's a design mockup for the Re-order feature. Let me know if there is something missing. I can walk you through it, as well.

resource list - reorder

@landitus landitus removed their assignment Nov 30, 2018
@landitus landitus added 🙋‍♀️ user-request Feature requested or reported by our users and removed 👨‍🎨design needed Information is required from the design team labels Nov 30, 2018
@francocorreasosa francocorreasosa added the 👨‍🎨design needed Information is required from the design team label Dec 7, 2018
@francocorreasosa
Copy link
Contributor Author

@landitus I've added the design needed label since we need a proper design for the selected state of the RL item (for accessible sorting with the keyboard).

@francocorreasosa
Copy link
Contributor Author

@landitus using this outline design in the meantime to differentiate the selected and non-selected row items:
image

@landitus
Copy link
Contributor

Thanks @francocorreasosa ! Just did a small adjustment to the focus state. You can check the updated invision prototype too.

screen shot 2018-12-10 at 15 32 22

@landitus landitus removed the 👨‍🎨design needed Information is required from the design team label Dec 10, 2018
@landitus
Copy link
Contributor

Just a small comment: When dragging an element over another, the tooltip is re-triggered and it creates an unpleasant effect.

I think disabling pointer events with CSS (pointer-events: none;) while an element is being dragged could be a good fix.

kapture 2018-12-18 at 15 13 00

@francocorreasosa
Copy link
Contributor Author

@landitus It should be fixed by now :)

Copy link
Contributor

@landitus landitus left a comment

Choose a reason for hiding this comment

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

LGTM!

@landitus landitus merged commit c7c486c into master Dec 18, 2018
@jcenturion jcenturion deleted the sortable-resource-list branch February 22, 2019 19:17
landitus pushed a commit that referenced this pull request Jan 17, 2020
Now, the `sortable` prop can be used to make the list sortable by dragging and dropping items. You will need to implement the `onSortEnd` method in order to reorder the items using the provided `arrayMove`

![kapture 2018-12-04 at 18 22 31](https://user-images.githubusercontent.com/4152942/49473729-9bed4f80-f7f1-11e8-87c3-5638d8d95bac.gif)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🖥️api / dx Improvements to developer/user experience 🚀 release: minor new features and non-breaking changes 🙋‍♀️ user-request Feature requested or reported by our users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants