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

Refactor user dropdown logic into reusable component #1381

Closed
5 tasks
Tracked by #1389
mikkonie opened this issue Mar 4, 2024 · 1 comment · Fixed by #1386
Closed
5 tasks
Tracked by #1389

Refactor user dropdown logic into reusable component #1381

mikkonie opened this issue Mar 4, 2024 · 1 comment · Fixed by #1386
Assignees
Labels
app: projectroles Issue in the projectroles app internal Changes invisible to the user or APIs (e.g. refactoring and optimization)
Milestone

Comments

@mikkonie
Copy link
Collaborator

mikkonie commented Mar 4, 2024

Sequel to #1380, also needed for #1366.

Similar to the sidebar, we want to be able to provide the user dropdown links also in an Ajax view for possible client side UIs. And similar to the sidebar, the logic for the dropdown is contained in the context processor, template and template tags.

So, you guessed it: we need to refactor the user dropdown in a similar way to the sidebar.

Spec

  • Add get_user_links() method to AppLinkContent helper created in Refactor sidebar logic into reusable component #1380
  • Move logic from _site_titlebar_dropdown.html and related template tags into new method
  • Deprecate site_app_processor()
  • Add wrapper template tag to retrieve list into _site_titlebar_dropdown.html
    • Call it and render the dropdown links in the template
  • Add tests for new helper class
  • Add/update UI tests
    • I'm not sure if we have UI tests for the menu? If not, a new class should be added next to TestProjectSidebar. Testing with both regular user and admin
  • Remove unused template tags (if any)

Tasks

  • Add helper class
  • Move user dropdown logic into class
  • Deprecate site_app_processor
  • Update tests
  • Remove unused template tags (if any)
@mikkonie mikkonie added internal Changes invisible to the user or APIs (e.g. refactoring and optimization) app: projectroles Issue in the projectroles app labels Mar 4, 2024
@mikkonie mikkonie added this to the v1.0.0 milestone Mar 4, 2024
@gromdimon gromdimon linked a pull request Mar 27, 2024 that will close this issue
@mikkonie
Copy link
Collaborator Author

Done by @gromdimon and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: projectroles Issue in the projectroles app internal Changes invisible to the user or APIs (e.g. refactoring and optimization)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants