Address objects in settings via react-router
Description
Environment
Potential Workaround
is blocked by
relates to
Checklist
hideTestRail: Results
Activity
Mike Taylor November 7, 2017 at 2:10 PM
Looks like all the prerequisites are complete. Since this was an umbrella, that means we're done here. Excellent: the UI code is a bit DRYer!
Mike Taylor October 12, 2017 at 2:14 PMEdited
Anyway, I discussed with @Matt Connolly and we agreed that the way forward is for me to copy <EntrySelector>
into stripes-components. Once it's been released there, we can rewire the Loan Policies editor to use it, and remove the local copy; and we can go on to also use it in the permission-set editor.
Mike Taylor October 12, 2017 at 8:43 AM
No worries! So this sub-problem will solve itself on the next rebuild?
Wayne Schneider October 11, 2017 at 10:30 PMEdited
@Mike Taylor – it looks like that permission was added on Sept. 29, so would not be in the build from Sept. 25: https://github.com/folio-org/folio-ansible/commit/18389478111635c9d80b32a64833de0d08812ec0#diff-7a68501b1aab94f42be6a314160f918e
Sorry for the hassle.
Matt Connolly October 11, 2017 at 3:48 PM
@Mike Taylor, loan policies have individual URLs because they're using the EntrySelector component as an intermediary. EntrySelector should be reusable for other list-type settings pages, but right now it only lives in ui-circulation.
This is an umbrella issue for several module-specific issues to come.
We use react-router to get into the settings area:
http://folio-testing.aws.indexdata.com/settings
And into individual modules' settings areas:
http://folio-testing.aws.indexdata.com/settings/users
And into specific pages of a module's settings:
http://folio-testing.aws.indexdata.com/settings/users/perms
But once we're in the individual pages, most of them use local state to navigate between specific objects that are being maintained. For example, in the permission-set editor, the same URL (shown above) is used for editing Jakub's Set or Untitled Permission Set or any other set.
We should use proper routing all the way down, so that we'd have URLs like
http://folio-testing.aws.indexdata.com/settings/users/perms/Jakub's+set
Related to this, I worry that we are starting to proliferate settings pages with very similar code. We should look at whether we can abstract out a skeleton that can be customised.