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

Announce Plugin, add features to current plugin #2119

Merged
merged 35 commits into from
Oct 5, 2023

Conversation

BryanValverdeU
Copy link
Contributor

  1. Add new features to announce like on last Cell and when creating a new list item (These are already in OWA, just moving them to this plugin) plus a new parameter in the constructor to not handle them if needed or add new features if needed (mostly used for Unit test right now but could be usefull).
  2. Moved the getAnnounceDataForList to dom package since it will be used in multiple places & removed the export of get Roman and alpha bullets from index.ts in rooster dom package
  3. Renamed Couple of KnownAnnounceStrings to have a better name, these changes still havent been released so should not be a breaking change.
  4. Add related unit tests

@JiuqingSong
Copy link
Collaborator

Is it possible to keep getAnnounceDataForList in plugins package since it is only used for announcing? We should be careful of the bundle size of dom package since it is widely used.

@BryanValverdeU
Copy link
Contributor Author

Is it possible to keep getAnnounceDataForList in plugins package since it is only used for announcing? We should be careful of the bundle size of dom package since it is widely used.

Moved the util to plugins package as suggested.


private handleFeatures(event: PluginKeyDownEvent, editorInput: IEditor) {
editorInput.runAsync(editor => {
if (!editor || editor.isDisposed()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

minor: when use this editor parameter, it is guaranteed that editor must not be disposed. So no need to check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, removed this check since it is not needed. Thanks.

@BryanValverdeU BryanValverdeU merged commit 1ba8d4a into master Oct 5, 2023
7 checks passed
@BryanValverdeU BryanValverdeU deleted the u/bvalverde/announceInRooster1 branch October 5, 2023 22:46
JiuqingSong added a commit that referenced this pull request Oct 6, 2023
* Content Model: Clear table selection fix (#2086)

* Content Model: Clear table selection fix

* fix build

* Fix #2078 (#2092)

* Fix #2078

* add test

* Graduate feature InlineEntityReadOnlyDelimiters (#2098)

* Graduate InlineEntityReadOnlyDelimiters

* fix build

* Fix 227982 (#2095)

* Content Model: Advanced cache (#2083)

* Content Model Customization refactor

* fix build

* improve

* Content Model Customization refactor 2: Add default config

* fix build

* Content Model: Persist cache 1

* fix build

* improve

* Content Model: Cache 2

* Fix test

* Fix build

* improve

* Improve

* improve

* Improve

* fix test

* Do not restore cached selection when call select

* Content Model: Add model into ContentChangedEvent

* fix build

* add demo site page

* Improve

* Content Model: pass out segment nodes

* cache 8

* fix build

* fix test

* Improve

* improve

* fix test

* Improve

* fix test

* Improve "checkDependency"

* Content Model: Clear table selection fix

* fix build

* Content Model: Improve adjustWordSelection

* add test

* add test

* fix test

* Improve

* retrigger check step

* retrigger check step

* do not underline, if not text

* remove empty line

* refactor

* Replace tslint with eslint (#2101)

* Graduate feature ContentModelPaste (#2102)

* Remove NodeType from Content Model (#2106)

* Enable eslint rule to improve imports (#2105)

* Enable eslint rule to force import type

* Clear duplicated imports

* selection

* Content Model: Move default format logic into ContentModelFormatPlugin (#2099)

* Content Model Customization refactor

* fix build

* improve

* Content Model Customization refactor 2: Add default config

* fix build

* Content Model: Persist cache 1

* fix build

* improve

* Content Model: Cache 2

* Fix test

* Fix build

* improve

* Improve

* improve

* Improve

* fix test

* Do not restore cached selection when call select

* Content Model: Add model into ContentChangedEvent

* fix build

* add demo site page

* Improve

* Content Model: pass out segment nodes

* cache 8

* fix build

* fix test

* Improve

* improve

* fix test

* Improve

* fix test

* Improve "checkDependency"

* Content Model: Clear table selection fix

* fix build

* Content Model: Improve adjustWordSelection

* add test

* add test

* fix test

* Graduate InlineEntityReadOnlyDelimiters

* fix build

* fix test

* Refactor format plugin

* fix test

* Improve

* fix build

* Standalone editor: remove SelectionRangeEx from Content Model (#2103)

* Remove SelectionRangeEx from ContentModel

* fix test

* improve

* fix build

* fix test

* Content Model: Move copy entity related code to copyPastePlugin (#2111)

* Fix PickPlugin will not remove nodes with other tags other than <a> tag (#2116)

* Content Model: Clear cache when input in expanded selection (#2114)

* Content Model: Clear cache when input in expanded selection

* fix build

* standalone editor: Remove dependencies (#2115)

* Standalone editor: decouple entity (#2107)

* Standalone editor: decouple entity

* fix build

* fix build

* improve

* fix build

* add test

* Add announce Plugin (#2109)

Add announce plugin
Add a AnnounceHandler, that will be in charge of announcing the messages by using a aria-live element, this handler will require a string map with the localized strings to announce messages from built-in RoosterJS features.
Add an additional callback property to ContentEditEventData, getAnnounceData, used in the Announce Plugin
Add first announcing logic when indenting/outdenting list

* image selection test

* Fix demo page (#2120)

* remove height

* WIP

* Standalone editor: decouple utilities (#2123)

* fix comment

* Fix Excel Border issue when pasting (#2121)

* init

* itChromeOnly

* add unit test

* fix chrome test

* Announce Plugin, add features to current plugin (#2119)

* init

* remove

* Fix type issues

* add tests

* Fix build

* Move logic from Editor to Plugin

* Add type to param

* DefaultAnnounceString to KnownAnnounceStrings

* merge classes

* Add more details in comments

* Fix build

* const enum

* fix

* init

* Add callback that returns string

* init2

* Fix test after merge

* Refactor

* refactor

* Fix

* Dispose editor

* Move util from dom to plugin pkg & fix

* remove unneeded if

* remove unneeded test

* image selection ctrl

* refator

* rename newImage

* fix build

* Recreate Content Model for table and image selection (#2128)

* Catch error and continue when dispose editor (#2129)

* Cache error and continue when dispose editor

* Improve

* Do not focus to editor when formatWithContentModel (#2130)

* Standalone editor: Remove more dependencies (#2127)

* Standalone editor: decouple utilities

* Standalone editor: Remove more dependencies

* fix build

* remove unnecessary code

* RoosterJs 8.57.0

---------

Co-authored-by: Júlia Roldi <juliaroldi@microsoft.com>
Co-authored-by: Julia Roldi <87443959+juliaroldi@users.noreply.github.com>
Co-authored-by: Leah Xia <107075081+Leah-Xia-Microsoft@users.noreply.github.com>
Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
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