macrozone
Repos
113
Followers
69
Following
22

Next-gen, highly customizable content editor for the browser - based on React and written in TypeScript. WYSIWYG on steroids.

9113
593

A tool to create and simulate dynamic Systems.

A TuringMachine in Coffeescript

Events

opened issue
make slate a controlled input

Problem

Slate was recently changed to be an uncontrolled component. this leads to massive problems for integrators of slate as uncontrolled components are not predictable because they have an inner state that is not fully controllable from outside.

Uncontrolled components therefore lead to bugs and inconsistencies

Solution

Slate should be a controlled component, means that it will always show consistently what is passed as a value

Alternatives

a workaround is shown here https://github.com/ianstormtaylor/slate/issues/4992 but that also does not always work. Since it relies on a useEffect the execution of the effect might be delayed and things get out of sync.

Context I am maintaining https://github.com/react-page/react-page and we use slate for rich-text editing. Since the mentioned update we have a hard time to fix all inconsistencies regarding slate

Created at 29 minutes ago
issue comment
SlateContext not found in Component on initial render

its probably better to implement a collapsilbe block element as a normal reactPage cellplugin. That way it can contain anything.

But also with a slate plugin, that sounds a bit adventurous.

You can use a slate plugin with a schema: https://github.com/react-page/react-page/blob/master/examples/plugins/customSlatePlugin.tsx

where you can define a boolean "startCollapsed" or so. You'll get that property in the Component of your custom slate plugin.

we could hower also inject slate (or useSlate) into the component which would be (or return) null in readonly.

There are already such injections, so should be possible to add it

Created at 1 day ago
issue comment
SlateContext not found in Component on initial render

you cannot use the useSlate hook inside the Component of the plugin, since this also renders in readonly mode where we don't want to load the whole slate library.

Is there a reason why you want to this hook in the component?

Created at 1 day ago

disable test for debugging

Created at 5 days ago

Updates

Created at 5 days ago
create branch
macrozone create branch main
Created at 5 days ago

getting there

Created at 5 days ago

hopefully fix deploy

Created at 6 days ago

chore: fix github token env var for release (#1271)

Created at 6 days ago
pull request closed
chore: fix github token env var for release

Proposed changes

Types of changes

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • [ ] Lint and unit tests pass locally with my changes
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added necessary documentation (if appropriate)
  • [ ] Any dependent changes have been merged and published in downstream modules

Closing issues

Further comments

Created at 6 days ago

Update release.yaml

Created at 6 days ago

add npm token

Created at 6 days ago
delete branch
macrozone delete branch dependabot/npm_and_yarn/loader-utils-2.0.4
Created at 6 days ago

chore(deps): bump loader-utils from 2.0.0 to 2.0.4 (#1252)

Bumps loader-utils from 2.0.0 to 2.0.4.


updated-dependencies:

  • dependency-name: loader-utils dependency-type: indirect ...

Signed-off-by: dependabot[bot] support@github.com

Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Created at 6 days ago
pull request closed
chore(deps): bump loader-utils from 2.0.0 to 2.0.4

Bumps loader-utils from 2.0.0 to 2.0.4.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Created at 6 days ago

chore: remove travis, add github token to actions

Created at 6 days ago
delete branch
macrozone delete branch dependabot/npm_and_yarn/decode-uri-component-0.2.2
Created at 6 days ago

chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#1260)

Bumps decode-uri-component from 0.2.0 to 0.2.2.


updated-dependencies:

  • dependency-name: decode-uri-component dependency-type: indirect ...

Signed-off-by: dependabot[bot] support@github.com

Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Created at 6 days ago
pull request closed
chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2

Bumps decode-uri-component from 0.2.0 to 0.2.2.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Created at 6 days ago
delete branch
macrozone delete branch dependabot/npm_and_yarn/qs-6.5.3
Created at 6 days ago

chore(deps): bump qs from 6.5.2 to 6.5.3 (#1261)

Bumps qs from 6.5.2 to 6.5.3.


updated-dependencies:

  • dependency-name: qs dependency-type: indirect ...

Signed-off-by: dependabot[bot] support@github.com

Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Created at 6 days ago
pull request closed
chore(deps): bump qs from 6.5.2 to 6.5.3

Bumps qs from 6.5.2 to 6.5.3.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Created at 6 days ago