Fix extension-provided navbar entries in the mobile menu.

Review Request #14154 — Created Sept. 10, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

We render navbar entries in two places: the topbar (just under the
"Review Board" label) and the mobile menu. In the mobile menu, the
navbar entries should be rendered using the sidebar layout/classes,
rather than the topbar ones. Unfortunately, extension-provided navbar
entries would only render using the topbar layout, which made them look
very ugly in the mobile menu.

This change adds an optional argument to the templatetag we use to
render the navbar items, which lets us choose a template to use.

  • Ran unit tests.
  • Looked and saw that the "Reports" entry added by Power Pack no longer
    looked terrible in the mobile menu.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Fix extension-provided navbar entries in the mobile menu.
We render navbar entries in two places: the topbar (just under the "Review Board" label) and the mobile menu. In the mobile menu, the navbar entries should be rendered using the sidebar layout/classes, rather than the topbar ones. Unfortunately, extension-provided navbar entries would only render using the topbar layout, which made them look very ugly in the mobile menu. This change adds an optional argument to the templatetag we use to render the navbar items, which lets us choose a template to use. Testing Done: - Ran unit tests. - Looked and saw that the "Reports" entry added by Power Pack no longer looked terrible in the mobile menu.
1643609b199c24510f49d0771b2b24eb1e531584 David Trowbridge
reviewboard/extensions/templatetags/rb_extensions.py
reviewboard/templates/base/page_sidebar.html
reviewboard/templates/extensions/navbar_entry_sidebar.html
Loading...