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

Support reordering of grid rows with drag and drop #2461

Open
ebruchez opened this issue Dec 11, 2015 · 12 comments
Open

Support reordering of grid rows with drag and drop #2461

ebruchez opened this issue Dec 11, 2015 · 12 comments

Comments

@ebruchez
Copy link
Collaborator

This is an obvious one as that would be much more user-friendly as the current system with menus.

This is a given for the full appearance. With the minimal appearance, which doesn't have menus right now, we could also make it an option.

+1 from customer

@ebruchez
Copy link
Collaborator Author

+1 from customer for easier reordering, possibly with a menu in addition.

@ebruchez
Copy link
Collaborator Author

For Form Builder, we just introduced drag and drop in the new workflow UI (see 3acb9a1 and 61aecd6). This gives us confidence that it would be easy to add drag and drop to repeated grids.

@ebruchez
Copy link
Collaborator Author

  • full appearance
    • Decide how to do the drag as we need a draggable handle somewhere, probably.
    • Do we keep the menu at all? We still need a way to insert and remove.
    • Should this be a new appearance of fr:grid?
    • Maybe appearance="full dnd"
  • minimal appearance
    • Similar questions, except we don't have the menu. Maybe appearance="minimal dnd"
  • consider fr:section / fr:repeater too
  • consider whether this is the time to introduce Scala.js to Form Runner, as use it for fb:dnd-repeat, but not for fr:tabbable

@Syncopatico
Copy link

For long lists, we'd also like to have an 'insert before/after ' option for moving items around grids, and an option to display and access a grid item number (bit hard to specify N without it). It would also be useful to have a duplicate function, where a grid item would not just be inserted after, but include the values entered in the current grid item (a bit like 'fill down' in a spreasheet). This can be useful where list items might contain some repeated values.

@ebruchez
Copy link
Collaborator Author

@Syncopatico Here are the separate issues I entered:

@ebruchez
Copy link
Collaborator Author

We had a quick look at the difficulty of doing the drag and drop (#2461) and it doesn't seem that hard, based on some support we already have in Orbeon Forms 2017.1 for drag and drop (see DndRepeat).

@ebruchez
Copy link
Collaborator Author

ebruchez commented Jun 9, 2017

Also consider keyboard shortcuts for moving.

@Syncopatico
Copy link

@ebruchez - I think a 'move to before/after row N' might work better than keyboard shortcuts, which would only move things one row at a time. With the repeating grid we have seen some odd behaviours when a large sequence of move instructions are given to it in rapid succession (such as when someone wants to move something several rows), and keyboard shortcuts may exacerbate that situation.

@ebruchez
Copy link
Collaborator Author

@Syncopatico Moving a row up/down with keyboard shortcuts would be in addition to drag and drop, which is what this issue covers. Moving to a given position by entering a number is covered by #3191. I think all those options can make sense depending on use case and the user's proficiency.

@ebruchez ebruchez added this to the 2017.2 milestone Jun 26, 2017
@ebruchez ebruchez added this to Backlog in Orbeon Forms 2017.2 Jun 26, 2017
@avernet avernet self-assigned this Jul 22, 2017
@avernet
Copy link
Collaborator

avernet commented Jul 22, 2017

For consistency, I am changing some of the icons around controls, grids, and sections to use the Bootstrap icons, for consistency, and I notice that for controls, sections, and grids settings we use a cog icon, while for the form settings we use a tool icon. I think we should use the cog or the tool icon everywhere, but am undecided as to which one is best. One argument for cogs is that this is what Apple uses for their Settings (iOS) and Preferences (macOS). So I'll go with that for now.

@avernet
Copy link
Collaborator

avernet commented Aug 25, 2017

Next, I want to:

  • Get the fb-section-editor to stay visible when the mouse is over it, even if it moves to another section.

This is so we can have more icons on the left of the section (at least 1 for the D&D), and will also solve the situation happening currently where one can't reach all the icons if the section is collapsed (less important) or contains a subsection (more important).

@avernet
Copy link
Collaborator

avernet commented Aug 25, 2017

Another way, most likely simpler to implement, and arguable even more usable, would be to leave the fb-section-editor visible, for the last section the mouse was inside of, as long as the mouse is inside the main form editing area.

@ebruchez ebruchez removed this from Backlog in Orbeon Forms 2017.2 Dec 4, 2017
@ebruchez ebruchez removed this from the 2017.2 milestone Dec 4, 2017
@ebruchez ebruchez added this to To Do in Orbeon Forms 2018.2 Sep 7, 2018
@ebruchez ebruchez removed this from To Do in Orbeon Forms 2018.2 Dec 3, 2018
@ebruchez ebruchez added this to To do in Orbeon Forms 2019.1 Jan 10, 2019
@ebruchez ebruchez moved this from To do to To review in Orbeon Forms 2019.1 Jun 3, 2019
@avernet avernet removed this from To review in Orbeon Forms 2019.1 Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants