Skip to content

Add an admin button to the navbar for staff#651

Merged
AdrianDAlessandro merged 2 commits intomainfrom
admin-button
Mar 26, 2026
Merged

Add an admin button to the navbar for staff#651
AdrianDAlessandro merged 2 commits intomainfrom
admin-button

Conversation

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator

Description

This PR adds an admin button to the account dropdown for staff.

Fixes #645

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Technical work (non-breaking, change which is work as part of a new feature)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@Sahil590 Sahil590 left a comment

Choose a reason for hiding this comment

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

LGTM. This is where Beautiful soup would come in handy making sure it renders the button if you are a staff member.

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator Author

LGTM. This is where Beautiful soup would come in handy making sure it renders the button if you are a staff member.

You're right, I did think this too. I might actually just wait until #623 is merged and add a then test to this PR

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator Author

@Sahil590 I've re-requested your review because I added in a couple BeautifulSoup tests. What do you think?

Copy link
Copy Markdown
Contributor

@Sahil590 Sahil590 left a comment

Choose a reason for hiding this comment

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

This Approach works. For some other projects instead of looking for the text within a tags we add and id to the tag and look for that specific id name. But in this case its not really necessary.
e.g <a id=framework></a>

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator Author

This Approach works. For some other projects instead of looking for the text within a tags we add and id to the tag and look for that specific id name. But in this case its not really necessary. e.g <a id=framework></a>

Based off #623 (comment) I think not adding IDs is the way to go

@AdrianDAlessandro AdrianDAlessandro merged commit bc342b4 into main Mar 26, 2026
4 checks passed
@AdrianDAlessandro AdrianDAlessandro deleted the admin-button branch March 26, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an admin button to the navbar for staff

2 participants