Restore markers reliably

Separate the stable element id from optional grouping and hidden-view reveal attributes.

Tip

Help me follow the Restore markers reliably guide. Separate the stable element id from optional grouping and hidden-view reveal attributes. Review the current project and turn this guidance into concrete next steps.

Attribute reference

AttributeRequiredPurpose
data-report-idRecommendedStable element id; CSS selector is the fallback.
data-report-typeOptionalitem (default) or group
data-fp-viewOptionalKey for a modal or tab that must be revealed
data-fp-openOptionalTrigger that opens a matching view

Reveal hidden targets

Use matching data-fp-view and data-fp-open values for hidden UI, and call onNavigate first when the target is on another route.

  • Do not duplicate ids.
  • Use stable ids instead of list indexes.
  • Changing group to item can affect old markers.
  • The nearest item wins inside nested ids.