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

Add rudimentary timeslot support #1087

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

hmpf
Copy link
Contributor

@hmpf hmpf commented Dec 12, 2024

It works but is almost indescribably fugly. No magic, to add another time recurrence it is necessary to "update" more than once.

As we plan to entirely hide the implementation of time recurrences, this is fine.

@hmpf hmpf added the frontend Affects frontend label Dec 12, 2024
@hmpf hmpf requested review from elfjes and a team December 12, 2024 12:57
@hmpf hmpf self-assigned this Dec 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 47.94521% with 38 lines in your changes missing coverage. Please review.

Project coverage is 80.84%. Comparing base (f08319f) to head (acfd5c5).

Files with missing lines Patch % Lines
src/argus/htmx/timeslot/views.py 47.22% 38 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1087      +/-   ##
==========================================
- Coverage   81.29%   80.84%   -0.45%     
==========================================
  Files         141      142       +1     
  Lines        5089     5154      +65     
==========================================
+ Hits         4137     4167      +30     
- Misses        952      987      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hmpf
Copy link
Contributor Author

hmpf commented Dec 12, 2024

List of timeslots, currently:

image

@hmpf
Copy link
Contributor Author

hmpf commented Dec 12, 2024

View time slot:
image

@hmpf
Copy link
Contributor Author

hmpf commented Dec 12, 2024

Update timeslot (Create is almost identical, just missing the empty extra form at the bottom.)

Note the dark background in the input fields. I suspect our "argus"-theme cannot be used together with dark mode, there's something we've forgotten to set. This should not be fixed per input-field but globally, once.

image

@hmpf
Copy link
Contributor Author

hmpf commented Dec 12, 2024

Finally, the delete-view:

image

@hmpf hmpf force-pushed the add-rudimentary-timeslots-page branch from 7dddb7e to acfd5c5 Compare December 13, 2024 13:46
@hmpf
Copy link
Contributor Author

hmpf commented Dec 13, 2024

New screenshot of the update/create page after we found the right way to fix the input field backgrounds in #1089

image

Copy link
Contributor

@podliashanyk podliashanyk left a comment

Choose a reason for hiding this comment

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

It is an absolute bare minimum timeslots page, with potentially some bugs (see comments below) and much follow-ups needed. The page is borderline un-understandable because of the UI (when I click on "Update" button somewhere in the middle, I am not immediately sure whether I will update the timeslot above or below f.e.), so some basic daisy-"cardification" plus minimal page organization with basic flexbox setup is high priority next step I would say. I suggest we make a meta issue and include this PR as one of the tasks there.

Do I understand correctly that some views seem redundant but are probably just a transitional step before we land on the page design (see comments below)? Also return values of most views will need to be changed in the future. F.e. we have redirects on timeslot delete action, while we need just to show the confirmation modal for it.

After a manual test this PR seems OK to me functionality wise (except what's mentioned in the comments below). Timeslots and recurrences are updated/created as expected (although the functionality is difficult to navigate in).

There will be HTML updates needed (adding h1, wrapping with fieldsets), but those belong to separate PRs.

src/argus/htmx/timeslot/views.py Show resolved Hide resolved
src/argus/htmx/timeslot/views.py Show resolved Hide resolved
@hmpf hmpf merged commit 8b5f8d1 into Uninett:master Dec 17, 2024
14 checks passed
@hmpf hmpf deleted the add-rudimentary-timeslots-page branch December 17, 2024 08:50
@hmpf
Copy link
Contributor Author

hmpf commented Dec 17, 2024

See #1094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Affects frontend
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants