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

Finish™ Docs #16

Merged
merged 9 commits into from
Oct 16, 2022
Merged

Finish™ Docs #16

merged 9 commits into from
Oct 16, 2022

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Oct 14, 2022

Docs' pages started and finished™:

  • styling
  • testing
  • typescript
  • writing your own plugins

@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2022

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review October 14, 2022 21:43
tablePreferences.delete('some-key');
```

Note that the data key in preferences must be serializable to JSON via JSON.stringify.
Copy link
Contributor

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?

Copy link
Contributor Author

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,
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 super neat, I didn't even know about this API


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>
Copy link
Contributor

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?"

Copy link
Contributor Author

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.
Copy link
Contributor

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

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 like this suggestion -- I've added some examples

class MyPlugin {
meta = {
table: MyTableMeta,
column: MyColumnMeta,
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@nicolechung nicolechung left a 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

@NullVoxPopuli NullVoxPopuli merged commit 1882a63 into main Oct 16, 2022
@NullVoxPopuli NullVoxPopuli deleted the upgrade-docs branch October 16, 2022 21:46
@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2022

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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