-
Notifications
You must be signed in to change notification settings - Fork 47
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
Feature/966 markdown in dialog #970
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Initial commit for #966, though if it turns out well and we can live with minor format changes, it's pretty much done. - Please test with your setups.
… each with a separate 'target': - Previously all plugins had one 'options' property that was an object with various plugin-specific settings. - I've identied use cases where it would be useful to use a single plugin but allow for multiple 'entities' of that plugin to have separate settings. One example is the new InfoDialog plugin where we provide the plugin once but it can initiate multiple dialog windows, each with different title, text, icon and target (i.e. control button or drawer button). - This change is totally backwards compatible: if 'options' isn't an Array, we just do what we did previously.
…to BaseWindowPlugin: - This new component will render a Dialog instead of a Window though. - It takes care of rendering the plugins that use it in the correct place, using value of the 'target' property.
- Created a separate component, LegacyNonMarkdownRenderer, that is used inside Dialog if Admin wants to bypass the new ReactMarkdown renderer. This legacy solution still uses dangeresoulySetInnerHTML, which is what some users still want to do. - This legacy renderer is also **the default renderer** for the old Information plugin. We preserve the current functionality by hard coding this option. If you want to use ReactMarkdown, you should switch to the new plugin: InfoDialog. - Dialog.js has been moved inside the Dialog folder. Some other componenets that import Dialog are included in this commit where I've fixed the path. - DialogWindowPlugin now passes on all the options to Dialog. This way we it's a bit more future-proof as we won't have to modify it each time we which to send a new option to the Dialog.
- This file holds and exports the object needed to provide custom components to react-markdown. - Dialog.js is now using these custom components. - TODO: Refactor FeaturePropsParsing.js so it makes use of this object too.
- Moved customComponentsForReactMarkdown to utils/ - Enabled 'export' for all components defined in customComponentsForReactMarkdown (this allows overriding of specific parts, should the need arise) - Refactored FeaturePropsParsing.js to use the common customComponentsForReactMarkdown library too.
jacobwod
added
module:client/core
Core functionality (not a plugin)
module:client/plugin
Functionality that goes into plugins in client
new feature
Request for adding/changing functionality
focus:accessibility
labels
Jan 5, 2022
Hallbergs
approved these changes
Jan 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
focus:accessibility
module:client/core
Core functionality (not a plugin)
module:client/plugin
Functionality that goes into plugins in client
new feature
Request for adding/changing functionality
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #966