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

Feature/improve contributor xp #729

Merged

Conversation

gcruchon
Copy link
Contributor

@gcruchon gcruchon commented Oct 18, 2020

Related issue

Reference to the issue

Fix #693

Description of the issue

Improving contributor experience by adding:

  • List of supported browsers
  • description of a component
  • description of tools
  • link to MS Eadge VM
  • list of scripts and what they do

This is a first version, do not hesitate to comment and request for more docs.

Person(s) for reviewing proposed changes

@arnaudforaison @samuel-gomez @guillaumechervet @xballoy @youf-olivier

@xballoy
Copy link
Contributor

xballoy commented Oct 19, 2020

Sync with @samuel-gomez because he did some modifications regarding the design system on #728.
Maybe you should move those modifications in the new repo.

xballoy
xballoy previously approved these changes Oct 19, 2020
@arnaudforaison
Copy link
Contributor

@gcruchon les modifications ont été faites, est ce que tu pourrais les mettre au bon endroit ou les revoir si nécessaire.

@gcruchon
Copy link
Contributor Author

OK, @xballoy and @arnaudforaison, I am going to rebase, but I hope you see that 2 separate repos are not really optimized for a simple contribution experience ;-)

@gcruchon
Copy link
Contributor Author

Waiting for comments from @youf-olivier (he has some ideas to add, as I understood) to finalize the PR.

@youf-olivier
Copy link
Contributor

Alors il faut ajouter :

  • Ca tourne que sur Node 12+
  • En cas de migration ou de problème il existe une commande (COMMAND OF THE DEATH car très gourmande) qui clean les repo (non lerna clean marche pas) : "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +" => Ca va dans tous les repo clean le node_module. J4ai du le faire quand j'ai switch de node 10 a 12.

@gcruchon
Copy link
Contributor Author

Merci @youf-olivier !

Pour le "ça tourne que sur Node 12+", j'ai gardé ce que @xballoy avait mis dans sa PR :

You must use a version of Node.js respecting the following rule >=10.14.2 or 12.x or >=14.

Pour les soucis de migration, en phase aussi, j'utilise beaucoup find . -name "node_modules" -type d -prune -exec rm -rf '{​​​​​​​​}​​​​​​​​' +
Et pour aller plus vite d'un npm run clean, j'utilise son frère find . -name "node_modules" -type d -prune -exec rm -rf '{​​​​​​​​}​​​​​​​​' +

Mais c'est mal, parce que :

  • C'est propre à Mac / Linux et ne marchera pas sur un PC...
  • En phase, lerna clean devrait faire la même chose que find . -name "node_modules" -type d -prune -exec rm -rf '{​​​​​​​​}​​​​​​​​' +, en étant agnostique à l'OS, il ne supprimera pas le node_modules de la racine, mais ça me va très bien. Il faudra juste faire un npm ci à la racine pour s'assurer qu'on repart de zéro. As-tu un cas précis pour lequel ça ne marche pas?

Du coup, je viens de poster un update qui :

  • ajoute un script clean:node_modules qui permet de faire tourner lerna clean
  • ajoute un script clean:dist qui reprend l'ancien fonctionnement du script clean
  • modifie le script clean pour faire tourner les deux sous-scripts
  • modifie la doc en conséquence (et ajoute la commande de la mort :))

xballoy
xballoy previously approved these changes Oct 25, 2020
@xballoy
Copy link
Contributor

xballoy commented Oct 25, 2020 via email

@gcruchon
Copy link
Contributor Author

Then all should OK for a merge ▶️

😅

xballoy
xballoy previously approved these changes Oct 25, 2020
youf-olivier
youf-olivier previously approved these changes Oct 26, 2020
CONTRIBUTING.md Outdated
For this, you will add a remote which points to the original repository (this has to be done only once):

```sh
git remote add upstream https://github.com/AxaGuilDEv/react-toolkit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce n'est pas plutôt https://github.com/AxaGuilDEv/react-toolkit.git

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix, thanks

```sh
git checkout master
git fetch upstream
git rebase upstream/master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La doc dit de faire un merge, utile de le préciser ici ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both merge and rebase are working, what's your issue with rebase?

https://medium.com/@topspinj/how-to-git-rebase-into-a-forked-repo-c9f05e821c8a

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les 2 fonctionnent mais la doc officielle GitHub dit de faire un merge. Peut importe c'est bien comme ça.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only thing: if, by mistake you started to work on your master branch, rebase will be easier to understand in the history.

Other issue I faced today: I worked on 2 different branches, my first branch (this one) is taking more time to be reviewed than my second branch (brandUlr). My second branch was merged into upstream repo before my first branch. Without rebase, it was a total mess in the history :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also prefer to rebase, I would keep it like that

CONTRIBUTING.md Outdated
├── src/
├── __snapshots__ : generated storybook snapshots used to test the component.
├── GreatComponent.js : the react component code.
├── GreatComponent.md : more documentation about the component (props, ...).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sauf erreur de ma part mais il n' y a que des README.md

CONTRIBUTING.md Outdated
Do not forget to update the component status page, located in this repository at:

```text
└─ src/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est ce que c'est vraiment l'endroit pour préciser cela ?

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'd root for that, even more since the code was split in another repo :) Not everybody have the history.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le code n'est pas splitté en plusieurs repo. On a d'un côté un site de présentation des guidelines et de l'autre (ici) l'implémentation des ces guidelines en React. 2 choses totalement différente

Copy link
Contributor Author

@gcruchon gcruchon Oct 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those 2 things were in the same repo before, that's why I call it a split :-D

Anyway, the end result: if you create / update a component here, you have to update the guideline as well, and it's a job to do in another repo. Therefore, if you are a newbie, like me, you are happy to know it.

I think you are right, I should not indicate the path to this "component-status" page (it may change one day). Is it OK to keep only a reminder (I just pushed that)?


Keep in mind, though, that your pull request will be squashed into master, so repository mainteners may use your commit message but are not entitled to use them as is.

## Scripts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour moi c'est de trop car les scripts évoluent et si le dev veut les voir il suffit d'aller sur le package.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not everybody is a jedi master. Think of this as a way to help newcomers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Gilles, we never have too much documentation

@@ -9,13 +9,13 @@
"scripts": {
"publish": "lerna publish",
"postinstall": "npm run clean && lerna bootstrap --no-ci && npm run style",
"clean": "node ./scripts/clean.js",
"clean": "npm run clean:node_modules && npm run clean:dist",
"clean:dist": "node ./scripts/clean.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peut etre utiliser un lerna exec couplé avec rimraf (le plus performant sur windows et utiliser par lerna clean)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I get it...

Rimraf being used in both lerna clean and clean.js what would you like?

I am not sure we should rewrite lerna clean. If any bug, let's fix it in Lerna's repo.

As for clean.js, if any bug / improvement, let's fix it in another PR?

@gcruchon
Copy link
Contributor Author

Je vous laisse merger, du coup? :)

@arnaudforaison
Copy link
Contributor

Je vous laisse merger, du coup? :)

Je t'ai fait des retours @gcruchon

@gcruchon gcruchon dismissed stale reviews from youf-olivier and xballoy via de37273 October 31, 2020 09:20
@gcruchon gcruchon force-pushed the feature/improve-contributor-xp branch from 1f172ae to de37273 Compare October 31, 2020 09:20
@gcruchon gcruchon force-pushed the feature/improve-contributor-xp branch from de37273 to 1585b92 Compare October 31, 2020 09:22
@gcruchon
Copy link
Contributor Author

Rebased & Pushed some fixes.

@gcruchon
Copy link
Contributor Author

gcruchon commented Nov 5, 2020

One more reviewer? @youf-olivier @arnaudforaison, are you OK with those fixes?

@gcruchon
Copy link
Contributor Author

gcruchon commented Nov 6, 2020

Should I rebase it or you can actually squash it in master?

@youf-olivier
Copy link
Contributor

Clairement je suis pas un super fan du nouveau bouton :

image

Ca va faire des historique dégueu avec de merge de la master vers la branche (cf le post #786)

@youf-olivier youf-olivier merged commit 220fdb0 into AxaFrance:master Nov 7, 2020
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.

Improve contributors' experience with more documentation.
4 participants