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

feat(generic): list all generic models on overview page #921

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

b1rger
Copy link
Member

@b1rger b1rger commented Jun 6, 2024

This commit introduces the templatetag genericmodel_content_types
which lists all content types of models that inherit from
apis_core.generic.abc.GenericModel. This templatetag is then used
in the overview template to create an overview of all those
contenttypes and not only apis_ontology and collections as it was
hardcoded beofre.

Closes: #912

@b1rger b1rger force-pushed the birger/912-overview branch 2 times, most recently from f04cbba to 3ae12b3 Compare June 6, 2024 11:29
@b1rger b1rger requested a review from koeaw June 6, 2024 11:29
@b1rger b1rger marked this pull request as ready for review June 6, 2024 11:29
@koeaw
Copy link
Contributor

koeaw commented Jun 24, 2024

So, what I find weird about this is that the history models appear under separate, second sections for the apps they belong to, further down the page.

I think it would make more sense if they appeared in closer proximity, and under the same section headline. Ideas: the sections could be split in half, with the left side containing the main models, the right side the histories. Or, models and histories could come in pairs? First button links to main models, second to that model's history.

I'm trying to think how I'd most likely look up/look for histories, and I think in my head I'd go by model name first, history second, so the idea of button pairs seems like it would take the least amount of time searching for the right button to click on.

@koeaw
Copy link
Contributor

koeaw commented Jun 24, 2024

Hmm, also, I see myself opening both the model and its history in parallel , e.g. to check I'm looking at the right object if there are several similar/same-ish named ones (which is the case in Frischmuth), for which the two buttons next to each other would also help.

@b1rger
Copy link
Member Author

b1rger commented Jun 24, 2024

So, what I find weird about this is that the history models appear under separate, second sections for the apps they belong to, further down the page.

Can you create a screenshot? The PR only splits the models by the app they belong to and the versions are part of the same app, so they should be part of the same section

@koeaw
Copy link
Contributor

koeaw commented Jun 24, 2024

This is what it looks like on my end:

Screenshot 2024-06-24 at 12-43-48 Title Placeholder

@b1rger
Copy link
Member Author

b1rger commented Jun 24, 2024

This is what it looks like on my end:

Hm, interesting, thats not how it should look

@b1rger b1rger force-pushed the birger/912-overview branch from 3ae12b3 to 413fc66 Compare June 24, 2024 11:12
@b1rger
Copy link
Member Author

b1rger commented Jun 24, 2024

So, what I find weird about this is that the history models appear under separate, second sections for the apps they belong to, further down the page.

Thats fixed now

This commit introduces the templatetag `genericmodel_content_types`
which lists all content types of models that inherit from
`apis_core.generic.abc.GenericModel`. This templatetag is then used
in the overview template to create an overview of *all* those
contenttypes and not only `apis_ontology` and `collections` as it was
hardcoded before.

Closes: #912
@koeaw
Copy link
Contributor

koeaw commented Jun 24, 2024

Yep, looks fine for me now!

Screenshot 2024-06-24 at 13-27-43 Title Placeholder

@b1rger b1rger merged commit eb53743 into main Jun 24, 2024
11 checks passed
@b1rger b1rger deleted the birger/912-overview branch July 2, 2024 10:27
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.

Improve button labels on overview page
2 participants