Skip to content

Guidance hours to internal#816

Open
PetterTjeldeVaagen wants to merge 13 commits into
mainfrom
feature/guidance-hours-to-internal
Open

Guidance hours to internal#816
PetterTjeldeVaagen wants to merge 13 commits into
mainfrom
feature/guidance-hours-to-internal

Conversation

@PetterTjeldeVaagen

@PetterTjeldeVaagen PetterTjeldeVaagen commented May 6, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Added the guidance hours to the internal pages of the website

Review guidance

Deployment notes

Manually fills in the current times for guidance hours

Checklist

(If any of the points are not relevant, mark them as checked, so that it's easy to see which points you've handled or not)

  • I've run makemigrations, makemessages and compilemessages
  • I've written tests that fail without these changes (if relevant/possible)
  • I've manually tested the website UI with different device layouts
    • Most common is to test with typical screen sizes for mobile (320-425 px), tablet (768 px) and desktop (1024+ px), which can easily be done with your browser's dev tools
  • I've manually tested with different users locally
    • This can be e.g. anonymous users (i.e. not being logged in), "normal" non-member users, members of different committees, and superusers
  • I've made sure that my code conforms to the code style guides
    • It's not intended that you read through this whole document, but that you get yourself an overview over its contents, and that you use it as a reference guide / checklist while taking a second look at your code before opening a pull request
  • I've attempted to minimize the number of common code smells
    • See the comment for the previous checkbox
  • I've added documentation
    • E.g. comments, docstrings, or in the README
  • I've added my changes to the "Unreleased" section of the changelog, together with a link to this PR
    • Mainly the changes that are of particular interest to users and/or developers, if any
  • I've added a "Deployment notes" section above and labelled the PR with has-deployment-notes
    • ...if anything out of the ordinary should be done when deploying these changes to the server (e.g. adding/removing an environment variable, manually creating/changing some objects, running a management command, etc.)
  • I've structured my commits reasonably

@PetterTjeldeVaagen PetterTjeldeVaagen added the feature New functionality on the page label May 6, 2026
@make-bot make-bot Bot added this to web May 6, 2026
@make-bot make-bot Bot moved this to Ready for Review in web May 6, 2026
@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.51613% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.90%. Comparing base (787ea4b) to head (bd7e15e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/internal/views.py 81.65% 20 Missing ⚠️
src/internal/admin.py 84.61% 2 Missing ⚠️
src/internal/models.py 87.50% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #816      +/-   ##
==========================================
- Coverage   87.99%   87.90%   -0.10%     
==========================================
  Files         153      153              
  Lines        6249     6397     +148     
==========================================
+ Hits         5499     5623     +124     
- Misses        750      774      +24     
Files with missing lines Coverage Δ
src/internal/forms.py 86.99% <100.00%> (+1.40%) ⬆️
src/internal/urls.py 100.00% <100.00%> (ø)
src/internal/admin.py 97.29% <84.61%> (-2.71%) ⬇️
src/internal/models.py 93.33% <87.50%> (-0.57%) ⬇️
src/internal/views.py 87.29% <81.65%> (-3.48%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ba11e-mos

Copy link
Copy Markdown

This is very nice, I've always wanted something like this on the website! One UX thing tho: could the layout be more compact, similar to Hackerspace's shift schedule? Each slot could just show member names (first name / short name)
inside the box, and clicking a slot opens a popup with the booking/cancel button + the comments textarea. Cuts the visual clutter of separate "book/cancel/full" + "comments" + admin columns down to one boxslot per timeslot.

image

Most of the backend is already there — GuidanceHoursView.get_context_data (src/internal/views.py:391-407) builds grouped_hours per weekday, so swapping the table layout in src/internal/templates/internal/guidance_hours.html + moving the action/notes UI into a modal would carry over the existing context cleanly. Solid implementation overall, just thought a denser layout could land better with daily users.

@TheStrgamer TheStrgamer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Most of this looks pretty good
Some smaller changes in style, layout and translation could be beneficial

Comment thread src/internal/models.py Outdated
Comment thread src/internal/static/internal/css/guidance_hours.css Outdated
Comment thread src/internal/static/internal/css/guidance_hours.css Outdated
Comment thread src/internal/static/internal/css/guidance_hours.css Outdated
Comment thread src/internal/static/internal/css/guidance_hours.css Outdated
Comment thread src/internal/views.py Outdated
Comment thread src/internal/views.py Outdated
Comment thread src/internal/views.py Outdated
Comment thread src/internal/models.py
Comment thread src/internal/models.py

@TheStrgamer TheStrgamer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Most of this looks pretty good
Some smaller changes in style, layout and translation could be beneficial

@TheStrgamer TheStrgamer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree with what ba11e-mos says about a more compact layout, with only name showing and not needing a booking button, but i also think we should keep the comment and general layout the same, and maybe make the tables collapsable.

Another thing is that you can now add different times that overlap or are equal, so maybe put a restricion there. for example i can have two 16-18 monday, or one 16-18 and one 17-19

PetterTjeldeVaagen and others added 2 commits June 7, 2026 17:13
Co-authored-by: Konrad Seime <93660591+TheStrgamer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality on the page has-deployment-notes

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants