-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add dropdowns to profiles page #1118
base: master
Are you sure you want to change the base?
Conversation
Test results 10 files 1 060 suites 38m 13s ⏱️ Results for commit 0177b93. ♻️ This comment has been updated with latest results. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1118 +/- ##
==========================================
- Coverage 79.67% 79.12% -0.55%
==========================================
Files 141 141
Lines 5288 5371 +83
==========================================
+ Hits 4213 4250 +37
- Misses 1075 1121 +46 ☔ View full report in Codecov by Sentry. |
9c7466b
to
63dd879
Compare
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.
This looks quite strange, when I try changing my selection of filters the dropdown and the box usually showing the selected filters disappear and I get the error
File "/home/johanna/Argus/.venv/lib/python3.12/site-packages/django/template/base.py", line 903, in _resolve_lookup
raise VariableDoesNotExist(
django.template.base.VariableDoesNotExist: Failed lookup for key [class] in {'placeholder': 'select destination...', 'id': 'id_destinations'}
Screenshots:
Before:
After selecting:
After clicking outside of the dropdown
547d727
to
a882c6b
Compare
This should have been fixed. |
fb1720e
to
2429e13
Compare
Lesson relearnt:
|
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.
Why does this PR have a timeslot polish in it? That seems like it should be a separate PR
And I'm not sure if this is a polish or it is fine that is behaving like this, but if on an existing profile I (un)select filters/destinations and then not click on Save
, but reload the page instead, then what the filter/destination field says is reset back to what the profile correctly has, but the checkboxes are still selected, which might trick the user into thinking it has been updated
{{ form.as_div }} | ||
{{ formset.as_div }} | ||
<div class="card-actions justify-end"> | ||
{% if form.instance %} |
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.
For some reason if I click the Create
button it still shows me Save
and Delete
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.
Fixed.
So that's where those patches disappeared to! Thx. |
102d0f5
to
9286009
Compare
I have removed the timeslots changes. |
I have seen that myself but don't know how to fix it. |
Quality Gate passedIssues Measures |
We can make it a polish issue and see, if we figure it out at some point |
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.
What about complaints from sonarqube? Also styles.css needs to be updated.
Works otherwise. We need to start looking at #1138 soon after this one is merged, otherwise the UX on error is quite poor
{% endblock field_control %}> | ||
<div tabindex="0" | ||
role="button" | ||
class="show-selected-box input input-accent input-bordered input-md border overflow-y-auto min-h-8 h-auto max-h-16 max-w-xs leading-tight flex flex-wrap items-center gap-0.5"> | ||
<p class="text-base-content/50">{{ widget.attrs.placeholder }}</p> | ||
{% if not widget.has_selected %}<p class="text-base-content/50">{{ widget.attrs.placeholder }}</p>{% endif %} |
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.
This is out of scope for this PR. If we keep it here, we should close #1100.
I also don't like how "jumpy" the width of the dropdown multiselect field becomes, we need a separate issue to fix it. We need both a minimum width and some transitions to smooth out the changes in width.
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.
The height is also fixed in the current dropdown: specialized for the filter box. It looks better with a higher min-height elsewhere.
Does the "autocomplete" commit fix this for you? Also, it is apparently a firefox only feature/problem. |
There is another thing I noticed: both "Filters" and "Destinations" multiselects on profiles page are wrapped with |
It's in the default diango template for as_div and with the merge of #1142 it can be altered by changing the file |
Closes #1096