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

CB-198: Filter "browse/view all reviews" by entity type #97

Merged
merged 2 commits into from Apr 17, 2017

Conversation

breakbuidl
Copy link
Contributor

@breakbuidl breakbuidl commented Apr 11, 2017

It needs work on the UI but are the changes according to what the ticket was for?

https://tickets.metabrainz.org/browse/CB-198

Users found it difficult to browse reviews of specific choice of
entity type. Currently, they have to find it by visiting every
page of the listed reviews.

- Add select option to views reviews based on entity type
- Add 'filter by entity type' while retrieving Review.list
@brainzbot
Copy link
Member

Can one of the admins verify this patch?

@breakbuidl breakbuidl changed the title Add feature to browse reviews by entity type CB-198: Filter "browse/view all reviews" by entity type Apr 11, 2017
@gentlecat
Copy link
Contributor

@brainzbot, ok to test.

@gentlecat
Copy link
Contributor

Please don't forget to assign that ticket to yourself and mark it as "In review". That way it's easier for us all to keep track of what other people are working on.

Copy link
Contributor

@gentlecat gentlecat left a comment

Choose a reason for hiding this comment

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

It needs work on the UI but are the changes according to what the ticket was for?

Looks like it is. @Freso?

There is a problem with the UI in cases when there are no reviews to show. Currently it just returns a 404 page with no way to change the filtering. This can be improved by getting rid of 404 in that case and just showing a message like "No reviews found."

@@ -5,6 +5,16 @@

{% block content %}
<h2>{{ _('Reviews') }}</h2>
<form method="GET" action="{{ url_for('review.browse') }}">
<div class="form-group" style="display: inline-block;">
<select class="form-control input-sm" name="entity_type" onchange="this.form.submit()">
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would look better if we used "nav-pills" here (similar to what we have at https://metabrainz.org/reports). A row that looks like Entity type: <All> <Release group> <Event> <Place>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not include 'Entity type:' because it broke the line and looked congested on smaller screens.
Do we need to do that? I think, with all the entity types listed it's quite self-explanatory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

potrait_mode

Copy link
Contributor

Choose a reason for hiding this comment

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

I've been considering that it would be useful when we have more types of filters in the future. But if that's too much of a problem now, we can improve this later.

<form method="GET" action="{{ url_for('review.browse') }}">
<div class="form-group" style="display: inline-block;">
<select class="form-control input-sm" name="entity_type" onchange="this.form.submit()">
<option value="None">{{ _('All') }}</option>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can just have an all value here instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did this in the latest commit

- Remove 404 and show 'No reviews found' for all entity types except 'all'
@gentlecat gentlecat merged commit 190274c into metabrainz:master Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants