Skip to content

Conversation

@TheStrgamer
Copy link
Contributor

@TheStrgamer TheStrgamer commented Mar 6, 2025

Proposed changes

Made the administration page accessible from the dropdown menu in internal pages, so you don't have to go back to public pages to access it.

Checklist

(If any of the points are not relevant, mark them as checked)

  • Remembered to run the makemigrations, makemessages and compilemessages management commands and committed any changes that should be included in this PR
  • Created tests that fail without the changes, if relevant/possible
  • Manually tested that the website UI works as intended 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)
  • Manually tested that everything works as intended when logged in as 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)
  • Made sure that your 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)
  • Attempted to minimize the number of common code smells
    • (See the comment for the previous checkbox)
  • Added sufficient documentation - e.g. as comments, docstrings or in the README, if suitable
  • Added your changes to the "Unreleased" section of the changelog - mainly the changes that are of particular interest to users and/or developers, if any
  • Added a "Deployment notes" section above, if anything out of the ordinary should be done when deploying these changes to the server
  • Structured your commits reasonably

@make-bot make-bot bot added this to web Mar 6, 2025
@make-bot make-bot bot moved this to Ready for Review in web Mar 6, 2025
@codecov
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.28%. Comparing base (62a250c) to head (33320e5).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #755   +/-   ##
=======================================
  Coverage   88.28%   88.28%           
=======================================
  Files         152      152           
  Lines        6207     6207           
=======================================
  Hits         5480     5480           
  Misses        727      727           
🚀 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.

@TheStrgamer TheStrgamer changed the base branch from main to dev March 6, 2025 15:41
@ddabble ddabble added the ⚡Quick review⚡ This PR is short and can be reviewed quickly. label Mar 23, 2025
Comment on lines 41 to 43
<a class="item" href="{% host_url 'admin_panel' host 'main' %}">
<div class="text">{% translate "Administration" %}</div>
</a>
Copy link
Member

@ddabble ddabble Mar 24, 2025

Choose a reason for hiding this comment

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

From a UX perspective, I don't think this button should be in this menu, as it can easily be confused to mean "Administration of the internal pages (i.e. the site I'm currently on)" - given that we've been able to successfully create a mental separation between the public and internal site with our users, of course. And as it is now, it's just one extra click to get to the public pages, anyway :)

But if you all agree that the button should be there, I'd suggest wrapping it in the same check as is done on the public pages, so that unprivileged users are not met with a 403 page 🙂

Suggested change
<a class="item" href="{% host_url 'admin_panel' host 'main' %}">
<div class="text">{% translate "Administration" %}</div>
</a>
{% if user|can_view_admin_panel %}
<a class="item" href="{% host_url 'admin_panel' host 'main' %}">
<div class="text">{% translate "Administration" %}</div>
</a>
{% endif %}

@ddabble ddabble deleted the branch main September 7, 2025 19:48
@ddabble ddabble closed this Sep 7, 2025
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in web Sep 7, 2025
@ddabble ddabble reopened this Sep 7, 2025
@ddabble ddabble changed the base branch from dev to main September 7, 2025 20:00
@make-bot make-bot bot moved this from Done to Ready for Review in web Sep 7, 2025
@ddabble
Copy link
Member

ddabble commented Sep 7, 2025

Did an oopsie - see #758 for context :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚡Quick review⚡ This PR is short and can be reviewed quickly.

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants