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

Add re-ordering support to our existing 'Members' admin view #1262

Closed
dannylamb opened this issue Sep 3, 2019 · 8 comments
Closed

Add re-ordering support to our existing 'Members' admin view #1262

dannylamb opened this issue Sep 3, 2019 · 8 comments

Comments

@dannylamb
Copy link
Contributor

If you go to the 'Members' tab for an object, you get an admin view with all of the members belonging to an object. According to this issue for the weight module, you can configure the view to become a drag 'n drop interface for re-ordering children. Add this to our view so we can re-order pages.

@dannylamb
Copy link
Contributor Author

Depends on #1261

@dannylamb
Copy link
Contributor Author

Linking to #932

@seth-shaw-unlv
Copy link
Contributor

We have a complication. Our new weight_field uses the 'integer' field type instead of the weight module's 'weight' field type. This is good in that we can force it to conform to the semantic requirements of http:purl.org/co/index but this blocks us from using the weight module's drag-n-drop functionality.

Two possible resolutions:

  1. Change the field_weight to use the weight field type. Pros: we get to use drag-n-drop. Con: it doesn't fit the semantics of http://purl.org/co/index; however, we can alleviate this by using https://schema.org/position instead which would take any integer value.
  2. Port the weight module's drag-n-drop to use integers with our configured min/max settings. Pro: we get to use drag-n-drop and keep our integer-based field. Con: more code we have to support ourselves.

Between the two, I would prefer the former over the latter.

@dannylamb
Copy link
Contributor Author

I'd make it a weight field. I always opt for the least code solution.

@seth-shaw-unlv
Copy link
Contributor

We have three UI options for creating a re-order page:

  • We can add it to the existing Members Tab so that you would have a top area for bulk actions and a bottom area for re-ordering (we can create a label for it, it just isn't shown here):

Screen Shot 2019-09-10 at 2 49 33 PM

- We can just create a link on the members tab to the re-order page (but then the re-order page has a significant jump in interface as you loose the tabs):

Screen Shot 2019-09-10 at 2 49 52 PM

- We could make another tab, although getting it to show up for a screen-shot is eluding me.

@seth-shaw-unlv
Copy link
Contributor

So I think this is our best option:
Screen Shot 2019-09-10 at 3 19 55 PM

HOWEVER, it adds a dependency on islandora_defaults because that is where field_weight is defined. 🙄 So, it looks like I will need to create this as a separate view in islandora_defaults. The question then is how to join them together again. Some funky config edits on the install hook?

@seth-shaw-unlv
Copy link
Contributor

I've updated the PR to just create another tab. It makes the PR much cleaner.

@dannylamb
Copy link
Contributor Author

Resolved via d45f948

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

No branches or pull requests

2 participants