Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

[WIP] Introduce Redux #173

Merged
merged 70 commits into from
Aug 17, 2016
Merged

[WIP] Introduce Redux #173

merged 70 commits into from
Aug 17, 2016

Conversation

willdurand
Copy link
Member

@willdurand willdurand commented Aug 10, 2016

This is not going to be fun, but this is definitely needed...

Purpose

In this PR, I refactor the whole project to introduce Redux and get rid of
our very own Store. This was nice to learn and play with React, but now we
are reaching the limits of this part. Hence this refactoring to use Redux
instead, as we did for Franklin for instance.

Features

  • Install Redux et al.
  • Refactor components into logical units
  • Make the component tests pass again
  • Rewrite the Store into a Redux store (using modules and redux-ducks)
  • Port all existing tests
  • Maybe write a few more tests
  • Maybe rename a few methods as our conventions slightly evolved since
    the beginning of this project (e.g., onSomething() vs
    handleSomething())

Also...

New Features

  • Shortcut: Cmd+B for surrounding a selection with ** (bold/strong)
  • Shortcut: Cmd+I for surrounding a selection with _ (italic)
  • Shortcut: Cmd+Z for undo

It is also possible to change the template of the default document without creating a new "working" document. A "working" document gets created when the content is changed.

ETA

No ETA yet. Hence, contributions should be delayed as most of the code will
be affected.

This is the first step for read only mode and more
This is because clipboard relies on a lib (matches-selector) that is not
node-compliant, cf. component/matches-selector#13.

The fix comes from: nihey/react-clipboard.js#25.
@willdurand willdurand temporarily deployed to staging August 16, 2016 13:33 Inactive
@willdurand willdurand temporarily deployed to staging August 16, 2016 14:13 Inactive
@willdurand
Copy link
Member Author

I am more and more convinced that having a separate routine for the synchronization is not our/my best idea..

@willdurand willdurand temporarily deployed to staging August 16, 2016 16:29 Inactive
@willdurand
Copy link
Member Author

Ok, that looks good to me now. Let's test it.

@willdurand willdurand temporarily deployed to staging August 16, 2016 18:45 Inactive
@willdurand willdurand temporarily deployed to staging August 16, 2016 19:57 Inactive
@willdurand
Copy link
Member Author

To fix:

Warning: Failed prop type: Required prop `forceUpdate` was not specified in `Editor`.
    in Editor
Warning: Failed prop type: Required prop `forceUpdate` was not specified in `Markdown`.
    in Markdown

@willdurand
Copy link
Member Author

willdurand commented Aug 16, 2016

Deployed last version (c1a2eeb) into production for 12-24h (with Sentry).

If you want to give it a try, browse https://monod.lelab.tailordev.fr/. If you don't have the latest version (see bottom right), close all your Monod tabs, then reopen https://monod.lelab.tailordev.fr/ again (that's how service workers work...).

Next:

  • if you cannot load your existing documents, please let me know
  • if you get new forks of your current document for no reasons (e.g., you are working alone), please let me know
  • if you get a weird experience, I am interested too
  • otherwise, Sentry should collect all other errors

@willdurand willdurand temporarily deployed to staging August 17, 2016 10:50 Inactive
@willdurand willdurand merged commit 8f0fdea into master Aug 17, 2016
@willdurand willdurand deleted the redux branch August 17, 2016 12:19
@willdurand willdurand removed the doing label Aug 17, 2016
@willdurand
Copy link
Member Author

🎆 🔥 ⭐ 🌟 🌠

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant