Skip to content

Conversation

@axelboc
Copy link
Collaborator

@axelboc axelboc commented Dec 18, 2025

  • Simplify some code in CurrentTree related to creating interleaved data collections
  • Remove a couple of bitwise operators in the queueGUI reducer to avoid ending up with 0/1 values in the displayData.collapsed/selected state instead of booleans.

</div>
<Collapse
id={`collapse-${data.queueID}`}
in={Boolean(displayData.collapsed)}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing this Boolean type cast now that it's guaranteed to remain a boolean in the state.

}
case 'COLLAPSE_ITEM': {
const displayData = { ...state.displayData };
displayData[action.queueID].collapsed ^= 1; // eslint-disable-line no-bitwise
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In addition to turning the collapsed state into a number, this line also mutates the Redux state, which is not recommended.

@axelboc axelboc marked this pull request as ready for review December 18, 2025 15:27
@marcus-oscarsson
Copy link
Member

Thanks !

@marcus-oscarsson marcus-oscarsson merged commit 083a8a0 into develop Jan 5, 2026
24 of 25 checks passed
@marcus-oscarsson marcus-oscarsson deleted the ab-refact-interleaved branch January 5, 2026 10:21
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.

4 participants