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

Fix contact selection issues #7358

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Fix contact selection issues #7358

merged 1 commit into from
Aug 9, 2024

Conversation

charlag
Copy link
Contributor

@charlag charlag commented Aug 8, 2024

This is another spin on solving #7256.

This reverts 5be8367 and 26dfa0f as they introduced some issues with initialization, namely initOnce could run multiple times.

In this commit we try to acknowledge that existing URL pattern is not sufficient to distinguish between the cases as we might have selection without focus.

Instead, we introduce an explicit argument to focus the item details.

We considered synchronizing the column focus state using this argument in all cases but this would entail a larger refactoring.

Comment on lines 72 to 74
this.targetContactId != null
? this.targetContactId
: !this.listModel.state.inMultiselect && this.listModel.getSelectedAsArray().length === 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Would nullish coalescing ?? not work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it would! I'll change it

@charlag charlag force-pushed the fix-contact-focus-7256 branch 2 times, most recently from 61a5a77 to 39319d7 Compare August 9, 2024 14:23
@charlag
Copy link
Contributor Author

charlag commented Aug 9, 2024

rebased

This is another spin on solving #7256.

This reverts 5be8367 and 26dfa0f as they introduced some
issues with initialization, namely `initOnce` could run
multiple times.

In this commit we try to acknowledge that existing URL pattern is not
sufficient to distinguish between the cases as we might have selection
without focus.

Instead, we introduce an explicit argument to focus the item details.

We considered synchronizing the column focus state using this argument
in all cases but this would entail a larger refactoring.
@wec43 wec43 merged commit 6226e69 into master Aug 9, 2024
1 check passed
@wec43 wec43 deleted the fix-contact-focus-7256 branch August 9, 2024 15:24
@charlag charlag added this to the 240.240816.0 milestone Aug 26, 2024
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