Skip to content

feature: hide automatic mappings - #61

Open
Imene-Amirat wants to merge 8 commits into
developmentfrom
feature-hide-automatic-mappings
Open

feature: hide automatic mappings#61
Imene-Amirat wants to merge 8 commits into
developmentfrom
feature-hide-automatic-mappings

Conversation

@Imene-Amirat

@Imene-Amirat Imene-Amirat commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Add a toggle to hide/show automatic mappings (LOOM, CUI,) in the mapping results table

Changes implemented:

  • Added a UI toggle to control the visibility of automatic mappings
  • Implemented frontend filtering logic to hide/show rows dynamically
image

A video demonstration is provided to show how the toggle works :
Capture vidéo du 2026-03-19 14-06-08.webm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a UI toggle to hide/show “automatic” mappings (LOOM, CUI, SAME_URI) in mapping result tables, implemented as a Stimulus controller that filters rows client-side.

Changes:

  • Add localized label for a “Hide automatic mappings” toggle (EN/FR).
  • Tag mapping table rows with map.source to enable client-side filtering.
  • Introduce a Stimulus controller and extend switch_input/SwitchInputComponent to support passing Stimulus data-* attributes.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
config/locales/fr.yml Adds French translation for the new toggle label.
config/locales/en.yml Adds English translation for the new toggle label.
app/views/mappings/_show_line.html.haml Adds map.source as a row class for concept mapping rows.
app/views/mappings/_show.html.haml Wraps results with Stimulus controller and adds the toggle + row classes for the modal/global mappings table.
app/views/mappings/_concept_mappings.html.haml Adds the toggle to the concept mappings tab and attaches the Stimulus controller.
app/javascript/controllers/index.js Registers the new auto-mapping-filter Stimulus controller.
app/javascript/controllers/auto_mapping_filter_controller.js Implements row hide/show logic for automatic mapping sources.
app/helpers/inputs_helper.rb Extends switch_input helper to accept data: and forward it to the component.
app/components/switch_input_component/switch_input_component.html.haml Applies forwarded data-* attributes to the switch wrapper element.
app/components/switch_input_component.rb Adds data: param storage for the switch component.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/views/mappings/_concept_mappings.html.haml Outdated
Comment thread app/javascript/controllers/auto_mapping_filter_controller.js Outdated
Comment thread app/views/mappings/_show.html.haml Outdated
Comment thread app/views/mappings/_show.html.haml Outdated
Comment thread app/views/mappings/_show.html.haml Outdated
Comment thread app/views/mappings/_show_line.html.haml Outdated
Comment thread app/javascript/controllers/auto_mapping_filter_controller.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/views/mappings/_mapping_table.html.haml
Comment thread app/javascript/controllers/auto_mapping_filter_controller.js
Comment thread app/javascript/controllers/auto_mapping_filter_controller.js Outdated
@Imene-Amirat
Imene-Amirat requested a review from hakimalem March 13, 2026 08:39
@Imene-Amirat Imene-Amirat changed the title Feature hide automatic mappings feature: hide automatic mappings Jun 17, 2026
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.

3 participants