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

DDFBRA-281 - Create go category page #1968

Merged
merged 5 commits into from
Jan 15, 2025

Conversation

Dresse
Copy link
Contributor

@Dresse Dresse commented Jan 14, 2025

Link to issue

https://reload.atlassian.net/browse/DDFBRA-281

Description

This PR adds a new content type called "GO Category Page" which will be used on the GO site.

The new content type is very simple and for now only consist of a title and paragraphs reference field. Furthermore a new details sidebar menu has been added called "Category Info" which consist of 4 fields containing the info needed in the "Kategori bånd" (Title, Image, Color and a optional audio field).

To add a new sound field, we also had to enable the "Audio" media type.

Both the new media type and the "GO Category Page" had to be enabled through GraphQL Compose.
The color field type is provided by a contrib module called "Color Field". The field type do not have a GraphQL Compose resolver or schema type associated with it, thus I have added one to the "dpl_graphql" module.

We want to use routes when querying content through GraphQL. This has been enabled through the GraphQL Compose Routes module.

A new role "GO Editor" has been added, which will be used for handling GO specific content/settings. A new custom permission has been added to the UniLogin configuration and granted to the new "GO Editor" role.
We also cleaned up and removed the "Bypass content access control" permission and instead are now using content specific permissions for each content type.

Additional comments or questions

Two additional comments:

  1. This task does only enable the querying of the GO Category Page. It does not implement a way of fetching all existing GO Category Pages and its fields. This will be part of another task.

  2. There is a separate task for setting up a new GO Editor role as well as hiding "GO specific" content/settings from all other roles than the GO Editor role, but I have decided to add the changes to this PR instead of a separate one, as it was the easiest thing to do.

2. Added new content type "go_category_page".

3. Enabled "Audio" media type and "go_category_page" content type in
graphql_compose configuration.
able to query nodes based on their url rather than their UUID's.

Enabled route querying for the GO content types "GO Page" and "GO Category Page".
for handling GO specific content and configuration.

Also added a new custom permission to the dpl_unilogin configuration route
and enabled the permission for the new "GO Editor" role.

Lastly we removed the "Bypass content access control" permission, and instead
added specific content access permissions for each content type to each role.
Copy link
Collaborator

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

I am sorry if I misinterpret something, because I am reviewing on my phone.😅
I think the content type should be called:
Label: Go Category
Machine name: go_category
Because of its multiple purposes of both categorizing content and serving a page.
If it is already like that, then forget about my comment. I just cannot read anything on this small screen.

Copy link
Collaborator

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

Please see my comment

This includes both file names, machine names and labels of the content type.
@Dresse
Copy link
Contributor Author

Dresse commented Jan 15, 2025

Please see my comment

I have read your reply and renamed "GO Category Page" into just "GO Category".
The same goes for filenames, machine names and labels.

I wasn't sure that we landed on the term "GO Category" instead of "GO Category Page", as I think me and Thomas was vouching for the other, but maybe that was when we where also talking about having a separate "GO Categories" vocabulary? Anyways, it has been renamed now. Please take another look! :) 👍

Copy link
Collaborator

@spaceo spaceo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@spaceo spaceo merged commit c584ff7 into develop Jan 15, 2025
20 checks passed
@spaceo spaceo deleted the DDFBRA-281-create-go-category-page branch January 15, 2025 09:31
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

Successfully merging this pull request may close these issues.

6 participants