Skip to content

Conversation

penglezos
Copy link
Contributor

Summary

This PR addresses the missing underline formatting option in the markdown editor's visual toolbar. While underline functionality was already available via keyboard shortcut (Ctrl+U), there was no visual button for users who prefer mouse interactions or are unaware of the hotkey.

Test plan

  • Start the development server: npm run start
  • Navigate to a markdown editor widget
  • Add "underline" to the toolbar buttons configuration
  • Verify the underline button appears in the toolbar with proper icon
  • Test functionality:
    • Click underline button to apply formatting
    • Click again to remove formatting
    • Verify Ctrl+U hotkey still works
    • Confirm strikethrough text renders correctly in preview

Preview

underline.mov

Checklist

@penglezos penglezos requested a review from a team as a code owner October 8, 2025 12:24
@martinjagodic martinjagodic requested review from demshy and removed request for a team October 8, 2025 12:28
@martinjagodic
Copy link
Member

@penglezos, why is it called horizontal-line instead of underline? I think we should call it for what it is to avoid confusion.

@penglezos
Copy link
Contributor Author

@penglezos, why is it called horizontal-line instead of underline? I think we should call it for what it is to avoid confusion.

Hey Martin, thanks for the feedback!

Just to clarify, the first PR I opened was for underline, which applies inline text decoration. The second commit that I pushed is a separate feature that inserts a divider (currently named horizontal-line).

You're right that the name could be clearer. I think its better to rename it to horizontal-rule to better reflect its semantic meaning. That should avoid any confusion between actual text underlines and dividers.

@martinjagodic
Copy link
Member

martinjagodic commented Oct 13, 2025

Ah, I get it now. Horizontal rule is better, yes. @demshy will review this PR then, he is the master of the editor.

@penglezos
Copy link
Contributor Author

penglezos commented Oct 13, 2025

Ah, I get it now. Horizontal rule is better, yes. @demshy will review this PR then, he is the master of the editor.

Done. Renamed horizontal line to horizontal rule for better clarity. Waiting for the code review.

@martinjagodic
Copy link
Member

Thanks @penglezos. I noticed you added clickStrikethroughButton in cypress/support/commands.js, but not for buttons introduced in this PR. Is there a reason for that? I would be great if we had minimal testing for all buttons.

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.

2 participants