-
Notifications
You must be signed in to change notification settings - Fork 6
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
Promotions index improvements #79
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tvdeyen
reviewed
Nov 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions. Also, at least some filtering integration spec would be nice, no?
app/views/solidus_friendly_promotions/admin/promotions/_table.html.erb
Outdated
Show resolved
Hide resolved
app/views/solidus_friendly_promotions/admin/promotions/_table.html.erb
Outdated
Show resolved
Hide resolved
mamhoff
force-pushed
the
promotions-index-improvements
branch
from
November 8, 2023 12:36
49cf853
to
6fd6acc
Compare
tvdeyen
reviewed
Nov 8, 2023
app/controllers/solidus_friendly_promotions/admin/promotions_controller.rb
Outdated
Show resolved
Hide resolved
app/views/solidus_friendly_promotions/admin/promotions/_table_filter.html.erb
Outdated
Show resolved
Hide resolved
app/views/solidus_friendly_promotions/admin/promotions/_table.html.erb
Outdated
Show resolved
Hide resolved
mamhoff
force-pushed
the
promotions-index-improvements
branch
from
November 8, 2023 12:44
6fd6acc
to
05c292b
Compare
We want to see at a glance what the lanes of our promotions are.
It's quite slow to calculate usage counts. Let's instead display an infinity symbol for promotions that don't have a usage limit.
When a promotion has no usage limit, we can still tell admins whether a promotion has been used at all. Counting one is not so hard.
This does not set a default filter, so we can still see all promotions, but it's real easy to set the filter to today.
This way the column makes more sense in the admin.
mamhoff
force-pushed
the
promotions-index-improvements
branch
2 times, most recently
from
November 8, 2023 16:46
edea845
to
3a2664f
Compare
tvdeyen
approved these changes
Nov 8, 2023
app/views/solidus_friendly_promotions/admin/promotions/_table.html.erb
Outdated
Show resolved
Hide resolved
app/views/solidus_friendly_promotions/admin/promotions/_table_filter.html.erb
Outdated
Show resolved
Hide resolved
The long one takes away a lot of row space.
mamhoff
force-pushed
the
promotions-index-improvements
branch
from
November 8, 2023 18:18
3a2664f
to
beeab14
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows searching by lane, customer label and active date ("Which promotions will be active Wednesday next week?").
Also speeds up display of the index page for promotions with a very high usage count and no usage limit.