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

Add APIs for outline state to RichTextReader and WrapperComponent #3462

Merged
merged 4 commits into from
Nov 22, 2022

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Nov 21, 2022

📝 Summary

Adds APIs to interfere with outline state to RichTextReader and WrapperComponent components.

Required for https://gitlab.com/collectivecloud/collectives/-/merge_requests/649

🚧 TODO

  • Change height of outline container height (not 100%, only content + a bit of padding on top and bottom)

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

@cypress
Copy link

cypress bot commented Nov 21, 2022



Test summary

107 0 0 0Flakiness 4


Run details

Project Text
Status Passed
Commit 7aaf051 ℹ️
Started Nov 22, 2022 12:01 PM
Ended Nov 22, 2022 12:07 PM
Duration 06:03 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


Flakiness

workspace.spec.js Flakiness
1 Workspace > formats text
sections.spec.js Flakiness
1 Content Sections > Heading anchors > Anchor scrolls into view
links.spec.js Flakiness
1 test link marks > link preview > shows a link preview
2 ... > Link website with selection

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

So far looks good to me. I guess the handing down props and propagating up events could be avoided by using provide and inject - but from what i see it's only two levels. So I'm not sure if that's worth it.

Export `OUTLINE_STATE` and `OUTLINE_ACTIONS` in NPM package.

Also add `EditorOutline` to `BaseReader` dom structure, so it can
be toggled by providing `OUTLINE_STATE` and `OUTLINE_ACTIONS` from
a parent vue component.

Signed-off-by: Jonas <jonas@freesources.org>
* Emit `outline-toggled` event when outline got toggled from Text
* Allow to pass property `showOutlineOutside` for changing outline state
  from parent component.

This is required to support toggeling the outline from inside
Collectives.

Related: #2919

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- marked this pull request as ready for review November 22, 2022 11:49
@mejo-
Copy link
Member Author

mejo- commented Nov 22, 2022

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@max-nextcloud max-nextcloud self-requested a review November 22, 2022 12:04
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

Had a quick look at the code again.

@mejo- mejo- merged commit 6e7c7e4 into master Nov 22, 2022
@delete-merged-branch delete-merged-branch bot deleted the enh/outline_npm branch November 22, 2022 12:08
@mejo-
Copy link
Member Author

mejo- commented Nov 22, 2022

/backport 2ed516d,a9f4db5ad7bae90d30e7960da68b02657165ff10,ac3518e4c5e7c064f5bd15489c32d3125b3b4fda to stable25

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.

3 participants