Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown formatting toolbar #10064

Closed
wants to merge 35 commits into from
Closed

Markdown formatting toolbar #10064

wants to merge 35 commits into from

Conversation

kazcw
Copy link
Contributor

@kazcw kazcw commented May 24, 2024

Pull Request Description

Implement the primary formatting toolbar for the Markdown editor.

Important Notes

Stacked on #10027, #10063.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

kazcw added 9 commits May 21, 2024 15:28
ExtendedMenu.

- DropdownMenu: Encapsulates the dropdown pattern, i.e. a toggle button that
  opens a floating pane.
- MenuButton: A low-level control that adds button behavior to any element; all
  other buttons are now implemented using it.
@kazcw kazcw added the CI: No changelog needed Do not require a changelog entry for this PR. label May 24, 2024
@kazcw kazcw self-assigned this May 24, 2024
@kazcw kazcw linked an issue May 24, 2024 that may be closed by this pull request
Comment on lines 225 to 230
return computed({
get: () => state.value,
set: (value) => {
if (value !== state.value) editor.update($setBlockType[value])
},
})
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a weird pattern, having side effects in the computed setter. Why not return the state here, and create a watcher to run the update?

@farmaazon farmaazon requested a review from Frizi June 5, 2024 14:06
@kazcw kazcw marked this pull request as draft June 5, 2024 14:06
@kazcw kazcw marked this pull request as ready for review June 5, 2024 14:07
@kazcw kazcw mentioned this pull request Jun 6, 2024
4 tasks
@kazcw
Copy link
Contributor Author

kazcw commented Jun 10, 2024

Merged in #10205.

@kazcw kazcw closed this Jun 10, 2024
@kazcw kazcw deleted the wip/kw/format-bar branch June 10, 2024 14:09
mergify bot pushed a commit that referenced this pull request Jun 10, 2024
Render markdown image syntax in documentation. Relative URLs are fetched from the project directory; absolute URLs are hotlinked from wherever they point.

Syntax and URL resolution:
```
# In New_Project27/src/Main.enso

## Main method docs
- Image at `New_Project27/src/image.jpg`: ![Image](image.jpg)
- Image at `New_Project27/image.png`: ![Image](../image.png)
- Image at `New_Project27/src/image.jpg`: ![Image](/src/image.jpg)
- Image at `New_Project27/image.png`: ![Image](/image.png)
main =
42
```

https://github.com/enso-org/enso/assets/1047859/3f873f3f-31b1-44bf-ae3e-2f467f2d546d

Closes #10058.

# Important Notes
Stacked on #10064.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add formatting toolbars to documentation editor
2 participants