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 'Add directory facet type' button to directory facets management page #277

Merged
merged 2 commits into from
May 15, 2023

Conversation

stephen-cox
Copy link
Member

@stephen-cox stephen-cox commented Apr 6, 2023

For discussion see: #276 (comment)

@finnlewis
Copy link
Member

Not ready just yet, need to check the UX and workflow of adding facet types and facets.

@willguv
Copy link
Member

willguv commented Apr 17, 2023

@stephen-cox could I see this working somewhere please? Many thanks

@stephen-cox
Copy link
Member Author

stephen-cox commented Apr 19, 2023

@stephen-cox could I see this working somewhere please? Many thanks

@willguv I've deployed it here: https://test.localgovdrupal.org/admin/content/directories/facets

@willguv
Copy link
Member

willguv commented Apr 19, 2023

Thanks @stephen-cox agree it's not perfect, but it's an improvement on what we have now. Users can add facet types from /admin/content/directories/facets which they were unable to do before

Would it be a lot of work to direct users adding a facet type from https://test.localgovdrupal.org/admin/content/directories/facets back to that page once added? If they then want to add a facet to that type, there's a clear route

Let's talk separately about an overhaul

@stephen-cox
Copy link
Member Author

We would need to implement some sort of hook to add the redirect, it shouldn't be too much work, but would need to investigate to determine the best way to implement this.

One issue that the redirect would apply to anyone who added a directory facet, which is not necessarily the best behavior; someone might want to add a bunch of facet types before then adding the facets. We could check the referrer header and only redirect when the user came from the facet management page, but this feels a bit hacky.

@willguv
Copy link
Member

willguv commented Apr 19, 2023

@stephen-cox could you describe how to rework this in the taxonomy style? Am trying to picture it - thanks

@finnlewis
Copy link
Member

@stephen-cox I've just added a new action link with a destination to return users to the facet content page after adding a facet from there.

So now, if we are at admin/content/directories/facets and click on "Add directory facet type" we can add a facet type and get returned to admin/content/directories/facets

If we are admin/structure/localgov_directories_facets_types and click on "Add directory facet type" we can add a facet type and get returned to admin/structure/localgov_directories_facets_types

Does that work?

@stephen-cox
Copy link
Member Author

@stephen-cox could you describe how to rework this in the taxonomy style? Am trying to picture it - thanks

@willguv What I had i mind is what's been implemented for Microsites

The the main directory facets page lists the types:

image

Clicking on a type takes you to the facets for that type

image

@willguv
Copy link
Member

willguv commented May 3, 2023

@stephen-cox that's much clearer - how long to implement please?

Will there be any issues for existing installs?

@stephen-cox stephen-cox requested a review from ekes May 3, 2023 13:52
@stephen-cox
Copy link
Member Author

@stephen-cox I've just added a new action link with a destination to return users to the facet content page after adding a facet from there.
Does that work?

Nice one @finnlewis Does the job 👍

@stephen-cox stephen-cox merged commit 284eb91 into 2.x May 15, 2023
@stephen-cox stephen-cox deleted the feature/2.x/276-facet-type-button branch May 15, 2023 13:15
@willguv willguv added the #2 Included in Product Update 2 label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#2 Included in Product Update 2
Projects
Development

Successfully merging this pull request may close these issues.

4 participants