Clean-up the old partial/cells on navigation menu#15862
Clean-up the old partial/cells on navigation menu#15862andreslucena merged 14 commits intodecidim:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes deprecated dropdown metadata cells and the "Last activity" cell from the mobile menu as part of a cleanup effort. The changes eliminate unused code that displayed activity information and secondary navigation in participatory space dropdown menus.
- Removes dropdown metadata cell classes and their associated tests across all participatory space modules (assemblies, conferences, initiatives, and participatory processes)
- Deletes the
MenuBreadcrumbLastActivityCelland its view template - Inlines the mobile menu dropdown content, removing the bottom section that contained highlighted process and last activity displays
- Removes the unused
secondary_menulocale key from English translations
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| decidim-participatory_processes/spec/cells/decidim/participatory_processes/process_dropdown_metadata_cell_spec.rb | Removes test file for deleted process dropdown metadata cell |
| decidim-participatory_processes/app/cells/decidim/participatory_processes/process_dropdown_metadata_cell.rb | Deletes process-specific dropdown metadata cell implementation |
| decidim-initiatives/spec/cells/decidim/initiatives/initiative_dropdown_metadata_cell_spec.rb | Removes test file for deleted initiative dropdown metadata cell |
| decidim-initiatives/app/cells/decidim/initiatives/initiative_dropdown_metadata_cell.rb | Deletes initiative-specific dropdown metadata cell implementation |
| decidim-core/lib/decidim/core/test/shared_examples/participatory_space_dropdown_metadata_cell_examples.rb | Removes shared test examples for dropdown metadata cells |
| decidim-core/config/locales/en.yml | Removes unused secondary_menu locale key |
| decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb | Deletes mobile menu dropdown partial that is now inlined |
| decidim-core/app/views/layouts/decidim/header/_main_menu_mobile.html.erb | Inlines mobile menu dropdown content, removing the bottom section with highlighted process and last activity |
| decidim-core/app/cells/decidim/participatory_space_dropdown_metadata_cell.rb | Deletes base dropdown metadata cell class |
| decidim-core/app/cells/decidim/participatory_space_dropdown_metadata/show.erb | Removes dropdown metadata cell view template |
| decidim-core/app/cells/decidim/participatory_space_dropdown_metadata/metadata.erb | Removes metadata partial template |
| decidim-core/app/cells/decidim/participatory_space_dropdown_metadata/links.erb | Removes links partial template |
| decidim-core/app/cells/decidim/content_blocks/menu_breadcrumb_last_activity_cell.rb | Deletes the menu breadcrumb last activity cell implementation |
| decidim-core/app/cells/decidim/content_blocks/menu_breadcrumb_last_activity/show.erb | Removes last activity cell view template |
| decidim-conferences/spec/cells/decidim/conferences/conference_dropdown_metadata_cell_spec.rb | Removes test file for deleted conference dropdown metadata cell |
| decidim-conferences/app/cells/decidim/conferences/conference_dropdown_metadata_cell.rb | Deletes conference-specific dropdown metadata cell implementation |
| decidim-assemblies/spec/cells/decidim/assemblies/assembly_dropdown_metadata_cell_spec.rb | Removes test file for deleted assembly dropdown metadata cell |
| decidim-assemblies/app/cells/decidim/assemblies/assembly_dropdown_metadata_cell.rb | Deletes assembly-specific dropdown metadata cell implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@andreslucena , this is ready.
|
…r/remove-old-codebase
|
@alecslupu can you change the base branch to |
The base branch was changed.
andreslucena
left a comment
There was a problem hiding this comment.
I think I found more references:
- $ rg dropdown_metadata
decidim-initiatives/lib/decidim/initiatives/participatory_space.rb
23: participatory_space.breadcrumb_cell = "decidim/initiatives/initiative_dropdown_metadata"
decidim-conferences/lib/decidim/conferences/participatory_space.rb
20: participatory_space.breadcrumb_cell = "decidim/conferences/conference_dropdown_metadata"
decidim-core/spec/helpers/decidim/breadcrumb_helper_spec.rb
20: dropdown_cell: "decidim/participatory_processes/process_dropdown_metadata",
decidim-core/spec/serializers/decidim/schema_org_breadcrumb_list_serializer_spec.rb
21: dropdown_cell: "decidim/participatory_processes/process_dropdown_metadata",
65: dropdown_cell: "decidim/participatory_processes/process_dropdown_metadata",
decidim-participatory_processes/lib/decidim/participatory_processes/participatory_space.rb
18: participatory_space.breadcrumb_cell = "decidim/participatory_processes/process_dropdown_metadata"
decidim-assemblies/lib/decidim/assemblies/participatory_space.rb
16: participatory_space.breadcrumb_cell = "decidim/assemblies/assembly_dropdown_metadata"
- $ fd dropdown_metadata
decidim-participatory_processes/app/cells/decidim/participatory_processes/process_dropdown_metadata/
andreslucena
left a comment
There was a problem hiding this comment.
Code-wise, I'd also refactor one partial, by including the contents of decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb on its only caller decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb. What do you think?
IMO we shouldn't have partials with only one caller (only on cases where it really improves legibility). If not its the typical problem of a worst developer experience for no good reason (like the typical problem of "having shared examples in rspec but they aren't actually shared, and they're only used by one example")
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb`:
- Line 50: The div with id "breadcrumb-main-dropdown-desktop" contains a stray
"test" CSS class that appears to be a debug artifact; remove the "test" token
from the class attribute in the element (keeping "menu-bar__main-dropdown" and
"menu-bar__dropdown-desktop" intact) so no unintended selectors or styling
couple to this markup (verify no other instances of a bare "test" class exist in
the same partial).
In
`@decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb`:
- Around line 4-12: Compute a single local boolean (e.g., is_current) per
breadcrumb item and use it both to decide whether to render a link and to set
the aria-current attribute instead of mixing item[:active] and the link
condition; update the link_to_if call to use that same is_current boolean for
the condition and pass "aria-current": (is_current ? "page" : nil), and when
rendering the fallback content_tag span remove the tabindex attribute so the
non-interactive span is not focusable and only set aria-current when is_current
is true.
🧹 Nitpick comments (1)
decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb (1)
51-55: Align ARIA attributes on the close trigger for dropdown accessibility.
The open trigger declares state; the close trigger should do the same for consistency and SR clarity.♿ Proposed tweak
- <button id="main-dropdown-summary-desktop-close" class="main-bar__links-desktop__trigger" - data-controller="dropdown" - data-target="dropdown-menu-main-desktop"> + <button id="main-dropdown-summary-desktop-close" class="main-bar__links-desktop__trigger" + data-controller="dropdown" + data-target="dropdown-menu-main-desktop" + aria-controls="dropdown-menu-main-desktop" + aria-expanded="true">
decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb
Outdated
Show resolved
Hide resolved
decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_desktop.html.erb
Show resolved
Hide resolved
…top.html.erb Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…-cofe/decidim into chore/header/remove-old-codebase
|
@alecslupu seems like this is breaking |
andreslucena
left a comment
There was a problem hiding this comment.
More things that aren't needed as far as I see.
$ rg breadcrumb_cell
decidim-core/app/controllers/concerns/decidim/participatory_space_context.rb
51: dropdown_cell: current_participatory_space_manifest.breadcrumb_cell,
decidim-assemblies/app/controllers/concerns/decidim/assemblies/assembly_breadcrumb.rb
15: dropdown_cell = current_participatory_space_manifest.breadcrumb_cell
decidim-core/lib/decidim/participatory_space_manifest.rb
48: attribute :breadcrumb_cell, String
$ rg dropdown_cell
decidim-core/app/controllers/concerns/decidim/participatory_space_context.rb
39: # * dropdown_cell - When this value is present is used to generate a dropdown
51: dropdown_cell: current_participatory_space_manifest.breadcrumb_cell,
decidim-assemblies/app/controllers/concerns/decidim/assemblies/assembly_breadcrumb.rb
15: dropdown_cell = current_participatory_space_manifest.breadcrumb_cell
22: dropdown_cell:,
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
* Remove unused content blocks * Remove unused string * Remove addtional cells * Remove metadata references * Cleanup * Update decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Fix area-current page in menu breadcrumb * Fix failing specs on schema specs * Last round of cleanup --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>


🎩 What? Why?
In this PR i am removing the Last activity cell present in menu, with all the subclassess.
📌 Related Issues
Link your PR to an issue
Testing
📷 Screenshots
Please add screenshots of the changes you are proposing
Before
After
Summary by CodeRabbit
Removed Features
UI Changes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.