-
Notifications
You must be signed in to change notification settings - Fork 8
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
Finish™ Docs #16
Finish™ Docs #16
Conversation
10b8933
to
cab0217
Compare
Preview URLsGH Env: preview |
docs/plugins/writing-your-own.md
Outdated
tablePreferences.delete('some-key'); | ||
``` | ||
|
||
Note that the data key in preferences must be serializable to JSON via JSON.stringify. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is an example that is not serializable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like a function, Map, Set, custom class, etc
In your plugin, never set the `style` attribute. | ||
Instead, set a specific property so that other plugins may alter styles as well. | ||
In your plugin, never set the `style` attribute, this will interfere with other plugins that also add to or remove styles. | ||
Instead, working with a [`CSSStyleSheet`][mdn-CSSStylesheet] and setting specific properties is much more robust, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super neat, I didn't even know about this API
docs/plugins/writing-your-own.md
Outdated
|
||
This document is an overview of the plugin system. For details, see the _[Plugin API Documentation][docs-plugins]_. | ||
|
||
<small>Note that the documentation generation tool includes the internal file path of each module, which is useful for finding where to contribute, but this file path does not represent the public/private visibility of the APIs within (the import paths would though)</small> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: I kind of think this paragraph above and the links below can be moved further down.
Reason being is I think people's logic tends to move from "why would I want to do this / learn how to do it" down to "how do I do this?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense to me! moved to the bottom.
## What can be extended? | ||
|
||
Plugins should extend from [`BasePlugin`][docs-base-plugin] (which provides some helper utilities) where a plugin may implement the features described by the [`Plugin`][docs-plugin-interface] interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: it might be worth having a paragraph before this saying that you can use plugins to write (below as an example, I don't actually know)
- filters
- expanding / nested tables
- grouping
- pagination
- styling of specific columns
- row selection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this suggestion -- I've added some examples
class MyPlugin { | ||
meta = { | ||
table: MyTableMeta, | ||
column: MyColumnMeta, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thought of this now, but how come there isn't row
meta?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
until now, there's been a lack of time / priority -- I'm working on that now over here: #12
and may pull it out to a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Left some suggestions, but I think this can also be follow up as guides/tutorials
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Docs' pages started and finished™: