Skip to content

perf: hoist inline style objects out of RegistryTable render path (#386) - #529

Merged
dadadave80 merged 1 commit into
Heliobond:mainfrom
aristotle224:fix/386-hoist-registry-table-styles
Aug 31, 2026
Merged

perf: hoist inline style objects out of RegistryTable render path (#386)#529
dadadave80 merged 1 commit into
Heliobond:mainfrom
aristotle224:fix/386-hoist-registry-table-styles

Conversation

@aristotle224

Copy link
Copy Markdown
Contributor

Summary

Closes #386

Static style objects were constructed on every render inside
RegistryTable, Th, Row, and ScoreField, producing a new object
reference each time and defeating React.memo bail-outs on list rows.

All static style objects are now module-level constants. Dynamic style
selection (e.g. active/inactive sort indicator colour in Th) uses
pre-built stable object pairs chosen by a conditional, rather than
constructing a new object per render.

Changes

  • scrollWrapStyle — hoisted wrapper div style
  • thActions — hoisted last spread
  • thBtnLeft / thBtnRight — hoisted Th button styles (split by align)
  • thLabelActive/Inactive, thIndicatorActive/Inactive — stable pairs replacing inline objects
  • rowBorderStyle, nameStyle, locationStyle, tdNumStyle,
    tdLastVerifiedStyle, tdActionsStyle — hoisted Row cell styles (pre-merged spreads)
  • editingRowStyle, editingCellStyle, editorFlexStyle,
    reVerifySpanStyle, btnGroupStyle — hoisted editor sub-row styles
  • scoreLabelStyle — hoisted ScoreField label style

No behaviour change — visual output is identical.

…liobond#386)

Static style objects were being constructed on every render inside
RegistryTable, Th, Row, and ScoreField, defeating React.memo bail-outs.

- Hoist wrapper div style to scrollWrapStyle
- Hoist last <th> spread to thActions
- Replace Th button/label/indicator inline objects with stable
  thBtnLeft/thBtnRight and active/inactive style pairs
- Hoist all Row inline objects (rowBorderStyle, nameStyle, locationStyle,
  tdNumStyle, tdLastVerifiedStyle, tdActionsStyle, editingRowStyle,
  editingCellStyle, editorFlexStyle, reVerifySpanStyle, btnGroupStyle)
- Hoist ScoreField label style to scoreLabelStyle

Closes Heliobond#386
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@aristotle224 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@aristotle224 is attempting to deploy a commit to the David Dada's projects Team on Vercel.

A member of the Team first needs to authorize it.

@sshdopey sshdopey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a solid, focused change that directly addresses the linked issue by hoisting static style objects out of the render path in RegistryTable. The refactor is clean and preserves visual output exactly. Nice work on splitting dynamic style pairs for active/inactive states too! Keep up the great contributions! ❤️

@sshdopey

Copy link
Copy Markdown
Contributor

Approved! 🎉 I couldn't auto-merge this just yet (it may need a rebase or have a check still running). A maintainer can merge it whenever it's ready.

@dadadave80
dadadave80 merged commit 514a379 into Heliobond:main Aug 31, 2026
2 of 3 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.

Avoid rebuilding inline style objects in list rows

3 participants