Skip to content

Editor: Flow & subflow names are changed to all lowercase in search dialog #5348#5401

Merged
knolleary merged 6 commits intonode-red:masterfrom
n-lark:5348/preserve-search-dialog-casing
Jan 7, 2026
Merged

Editor: Flow & subflow names are changed to all lowercase in search dialog #5348#5401
knolleary merged 6 commits intonode-red:masterfrom
n-lark:5348/preserve-search-dialog-casing

Conversation

@n-lark
Copy link
Copy Markdown
Contributor

@n-lark n-lark commented Dec 30, 2025

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

Fixed #5348

Preserves original casing of flow/subflow names in search dialog results. The fix separates the index key (lowercase for case-insensitive searching) from the display label (original casing).

Also added:

  • CommonJS export to enable unit testing
  • Unit tests for the indexNode function and search results

Note: I added test exports (_indexNode, _index) to enable unit testing for this fix. I noticed the UI modules use the IIFE pattern, is there a preferred approach for making these testable? I'm curious if there's interest in exploring ES6 classes for future work, but happy to follow whatever patterns the project prefers.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run npm run test to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Dec 30, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@n-lark n-lark force-pushed the 5348/preserve-search-dialog-casing branch from 49f7496 to af6e2c1 Compare December 30, 2025 19:15
Copy link
Copy Markdown
Member

@knolleary knolleary left a comment

Choose a reason for hiding this comment

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

Thanks for this.

As you've noted, we don't currently have a strategy for unit testing front-end code like this. The long-standing IIFE approach doesn't lend itself too well to it - not ideal to be exposing internal functions on the api like this.

I'd prefer not to get wrapped up in identifying how to improve the UT approach at the same time as trying to deliver this specific fix. We should separate those discussions.

We can run with this PR for now (just need the old copyright header removing from the new file - something we'll be doing to all files in the near future).

…copyright

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
@n-lark
Copy link
Copy Markdown
Contributor Author

n-lark commented Jan 5, 2026

Thanks @knolleary, I’ve removed the old copyright header as suggested.
Please let me know if you’d like any other changes.

@knolleary knolleary merged commit 633f90e into node-red:master Jan 7, 2026
5 checks passed
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.

Editor: Flow & subflow names are changed to all lowercase in search dialog

2 participants