Skip to content

Conversation

@pedromml
Copy link

Updates the behavior of multiple source fields. Now, a Source i will be visible if source:i-1 has a non-empty value, or if any source tag with index > i has a non-empty value.
This will ensure all Source fields from 1 to 3 to be visible if source:3 has a non-empty value

Copy link
Member

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

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

This looks good at a glance. Could you add a test of this functionality? It would probably be similar to one of the tests you wrote in source_subfield.js. Thanks!

Comment on lines 75 to 76
let sourceRegex = /^source/;
if (tag.match(sourceRegex) ){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let sourceRegex = /^source/;
if (tag.match(sourceRegex) ){
if (tag.startsWith('source')) {

@danrademacher
Copy link

@1ec5 I assume based on your comment that this is not ready to merge?

@pedromml
Copy link
Author

pedromml commented Nov 6, 2024

I've been working on tests for this behavior for a while, more specifically for the id.uiSectionPresetFields() section, but haven't been able to get them working just yet.

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.

Source X fields in staging iD have offset delete behavior

3 participants