Tested with all sequence views, some examples:
Character sequences unfiltered
image.png (view on web)
with filter:
image.png (view on web)
Feature:
image.png (view on web)
Creator:
image.png (view on web)
Universe correctly pops it:
image.png (view on web)
For anything not involved in Marvel/DC, universes filter doesnt appear whenno sequences have a universe in data to filter:
image.png (view on web)
And then finally, the addition of story type filter I noticed meant we started to overhang on mobile, this would have made it worse, so added a wrap, example on mobile size:
image.png (view on web)
https://github.com/GrandComicsDatabase/gcd-django/pull/690
(3 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@jochengcd commented on this pull request.
This is filtering on the story universe, not the character universe ? To clarify, we maybe should label this with 'Story Universe' and not 'Universe' ?
Another thing, in difference to the other filters, here 'None' is a valid selection, i.e. filter for those stories without a universe set. Can we look into adding that ? Not sure if feasible, but the question will come from users.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
https://django-filter.readthedocs.io/en/latest/guide/tips.html
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@adam-knights pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is filtering on the story universe, not the character universe ? To clarify, we maybe should label this with 'Story Universe' and not 'Universe' ?
Correct, have updated for that before I forget.
Another thing, in difference to the other filters, here 'None' is a valid selection, i.e. filter for those stories without a universe set. Can we look into adding that ? Not sure if feasible, but the question will come from users.
I will give it a try :)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@jochengcd commented on this pull request.
> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
if publishers:
qs = Publisher.objects.filter(id__in=publishers)
self.form['publisher'].field.queryset = qs
+ if universe:
Looking further, I don't think that this should in CommonFilter, since it only applies to Sequences ?
> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
if publishers:
qs = Publisher.objects.filter(id__in=publishers)
self.form['publisher'].field.queryset = qs
+ if universe:
+ universes = set(self.qs.values_list(universe, flat=True))
+ universes.discard(None) # Remove None before checking if set is empty
+ if universes:
+ qs = Universe.objects.filter(id__in=universes).select_related('verse')
style guide of code is less then 80 characters
> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
if publishers:
qs = Publisher.objects.filter(id__in=publishers)
self.form['publisher'].field.queryset = qs
+ if universe:
+ universes = set(self.qs.values_list(universe, flat=True))
+ universes.discard(None) # Remove None before checking if set is empty
adding
null_label='No Universe',
to universe = ModelMultipleChoiceFilter(...) will do the filtering on no universe set, which we should support.
But then the universe filter will not show when selecting that, so unsetting only by going back, which is not ideal. Removing will show the universe box for characters without any, which we don't want either.
Can there be a different check ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
if publishers:
qs = Publisher.objects.filter(id__in=publishers)
self.form['publisher'].field.queryset = qs
+ if universe:
+ universes = set(self.qs.values_list(universe, flat=True))
+ universes.discard(None) # Remove None before checking if set is empty
if 'null' not in self.data.getlist('universe'):
universes.discard(None) # Remove None before checking if set is empty
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Another aspect to consider, universe will show on all sequence list, also for creators, features, ... Which I am not sure we want ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I also wonder now if we want this at all, we have pages such as https://www.comics.org/character/6122/issues/character_universe/3/
and your story type filter solved my immediate need.
We also have https://www.comics.org/universe/3/sequences/
The more I think about it, the more i wonder if this is adds the cumbersome of a filter that the users won't really need.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Maybe ask on main on use cases ?
We can:
We cannot:
But can we make use of that ? Adding many filters (at least in the current way) can become unwidely.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Yeah i'll ask the question - and we can find issues of a character set in a specific universe with https://www.comics.org/character/6261/issues/story_universe/2/ - so just boils down to if its worth it for 1) sequences only and 2) selecting multiple story universes.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closing in favor of the new screens (to come) - will revisit once those in place.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()