Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue with grid not allowing copying external ID #13650

Merged
merged 7 commits into from May 13, 2024

Conversation

mike12345567
Copy link
Collaborator

@mike12345567 mike12345567 commented May 9, 2024

Description

Fixing an issue with ID/Rev not being copyable from context menu due to the way IDs were split/handled in the grid.

External rows can have row IDs which contain - characters, this is used in the grid store to attach the field which is currently focused, this can be avoided by assuming the last split off - will leave the ID as the first element and the field as the second element.

Addresses

…to the way IDs were split/handled in the grid.
@mike12345567 mike12345567 added the firestorm Data/Infra/Revenue Team label May 9, 2024
@mike12345567 mike12345567 self-assigned this May 9, 2024
@mike12345567
Copy link
Collaborator Author

@aptkingston would appreciate your input on this - after some discussion with @samwho realised that we just can't use - for joining the ID and field name, as it could be present in either of them, so splitting is very difficult.

Instead using something very unusual to avoid this problem - ‽‽

Copy link
Member

@aptkingston aptkingston left a comment

Choose a reason for hiding this comment

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

LGTM!

Technically these are cell IDs rather than row IDs so a rename would be appreciated not definitely not required.

So purely for terminology consistency (since this is only for the grid codebase and we may as well use the same terms) I would opt for

const { rowId, columnName } = parseCellID(cellId)
const cellId = getCellID(rowId, columnName)

But that's just me being overly anal about naming. Functionally this looks perfect and is much more robust and maintainable. Meant to do this myself at some stage rather than have the duplicated logic all over the place. Nice one!

@mike12345567 mike12345567 merged commit 6268814 into master May 13, 2024
10 checks passed
@mike12345567 mike12345567 deleted the fix/copy-id-rev branch May 13, 2024 11:21
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants