Skip to content

Document _styleBeforeCompletion and _styleAfterClick (README + schemas) #260

Description

@swashbuck

Summary

Two related documentation gaps on the _button._styleBeforeCompletion and _button._styleAfterClick properties:

  1. README does not mention that _isFullWidth: true force-hides the Trickle button after completion regardless of _styleAfterClick. Behaviour is intentional (prevents stacked absolutely-positioned buttons) but undocumented, leading to confusion when authors set _styleAfterClick: "visible" or "disabled" and see the button disappear anyway.
  2. Schemas lack adequate help/description text for these two properties:
    • Legacy properties.schema help text is incomplete and does not include default values.
    • Modern schema/article.schema.json and schema/block.schema.json have no description field at all.

Source

js/TrickleButtonModel.js:195:

// Force button to be hidden after completion if _isFullWidth, otherwise absolutely positioned buttons will stack
const isButtonVisibleAfterCompletion = (trickleConfig._button._styleAfterClick !== 'hidden') && !trickleConfig._button._isFullWidth;

Suggested fix

  • README: add a note to the _styleAfterClick entry covering the _isFullWidth override.
  • Legacy and modern schemas: add short tooltip-friendly help/description text for both properties, including default value and the _isFullWidth interaction.

Reproduction

  1. Set _trickle._button._isFullWidth: true
  2. Set _trickle._button._styleAfterClick: "visible" (or "disabled")
  3. Complete the step. Button hides instead of remaining visible/disabled.

Posted via collaboration with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions