Giter Club home page Giter Club logo

typo3cms-guide-contributionworkflow's Introduction

typo3cms-guide-contributionworkflow's People

Contributors

3m5-seipelt avatar alexander-nitsche avatar brotkrueml avatar danielsiepmann avatar dawind avatar erredeco avatar garvinhicking avatar gilbertsoft avatar helhum avatar indyindyindy avatar jokumer avatar jonaseberle avatar josefglatz avatar liayn avatar linawolf avatar lolli42 avatar marble avatar mbrodala avatar mcmietz avatar michadu avatar mtelgkamp avatar n3amil avatar ohader avatar purhur avatar spoonerweb avatar susannemoog avatar sypets avatar tmotyl avatar tomwarwick avatar vertexvaar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typo3cms-guide-contributionworkflow's Issues

Improve usability of reading a page and finding specific thing on page

Problem / Usecase

  • Sometimes you want to jump directly to a specific section on a page but have trouble spotting it right away
  • fast readers want to glance through stuff and need more markers on the page
  • screenshots are sometimes not easiliy distinguishable from the text, even if a drop shadow is being used. (figure with :class: with-shadow)

Examples

bad examples

  • Gerrit signup
    • screenshots not easily distinguishable from text
    • there is no 1, 2, 3 and not enough subsections to visually divide the steps

https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Account/GerritAccount.html

gerrit

good examples:

quick-start-forms

Restructure guide

Tasks

structure

  • decide on general structure of guide
  • add chapters for contributing to docs and translation

In general: Name and structure the chapters as to what the person wants to do next. Focus on task, not tool. Use terminology that is common practices in contribution guides.

Following things belong together and might be restructured:

  • setup

    • Setting up your accounts
    • Setting up your environment
  • Submitting a patch

    • TYPO3 Contribution explained
    • Working with Gerrit
    • Fixing a bug
  • restructure and rename some things in the appendix

    • titles should be self-explanatory
    • Things should not be hidden deep down in the directory structure

possible subchapters

  • section: "Where to get help" in each chapter (info about slack channel and further reading)
  • use Quickstart at beginning, see #76
  • section "Contributors wanted" in each chapter with list of possible tasks (categorize by area and level of expertise) and / links to issues + PR

best practices

  • all titles should be self-explanatory, dynamic and void subchapter headings should be avoided
  • Focus on the task, not the tool: What does the person reading want to do next?
  • Structure each page / section which involves several steps into steps, see #77
  • add information about what the guide is about on start page and beginning of subchapter
  • quicklinks.
  • Alternative to quicklinks: use tile images as quick links, see TYPO3-Documentation/DocsTypo3Org-Homepage#22 (comment)

Inspiration

  • go contrib guidelines:
    • good: self-explanatory names for chapters, subsections
    • good: clear sitemap that fits on less than one page
    • good: numbering of steps
    • good: everything on one page, you don't have to click through pages with very little content
  • "How can I contribute" (Atom)

git setup with / without composer?

From Slack: There was a problem with setting up the commit hooks with composer

composer run gerrit:setup
Class TYPO3\CMS\Composer\Scripts\InstallerScripts is not autoloadable, can not call gerrit:setup:commitMessageHook:enable script
Class TYPO3\CMS\Composer\Scripts\InstallerScripts is not autoloadable, can not call gerrit:setup:preCommitHook:enable script

Should we still list the copy commands (as before)?

Add information about running phpstan?

I don't know if this is really necessary, but I saw that bamboo runs it and it is pretty easily done to execute it locally, and make sure the code is ready for a higher level.

Currently level 2 is used, which is not very high.

./bin/phpstan analyse --no-progress --no-interaction

./bin/phpstan analyse --no-progress --no-interaction -l3

Add information about deprecating public properties / methods and migrate public properties to protected

Information about deprecation is in: https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/Appendix/HowToDeprecateThings.html

There are some things missing:

Resources

Update section about deprecating functions in Apendix

https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/HowToDeprecateThings.html

(See also https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/BugfixingAZ/Index.html#adding-documentation)

  • shoudn't @deprecate contain information since when it is deprecated and when it will removed?
  • Is this already documented somewhere else?

Example from core:

// @deprecated since TYPO3 v9, will be removed in TYPO3 v10. Remove along with database field data_page_reg1

Shorten section on commit messages rules in Appendix and / or add summary

The section on commit message rules is very long: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/GeneralTopics/CommitMessage.html

It might be useful to

Testing the Core: documented commands do not work anymore

Maybe I am missing something important, but I have issues following the guide https://github.com/TYPO3-Documentation/TYPO3CMS-Guide-ContributionWorkflow/blob/master/Documentation/Testing/Index.rst

It should be noted IMHO that the steps from https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Setup/SetupTypo3.html?highlight=yarn are necessary first.

The docker image ‹typo3gmbh/php72:latest› has no file /sbin/my_init - so the commands under "docker run" give an error about it.

There is also no ‹bin/chromedriver› in the docker image.

  • I am not sure if this is expected (then it should be noted) or if it is an oversight in the documentation or a bug in the underlying Dockerfiles

Probably I missed something. Maybe I am using it wrong. I wanted to run the core tests locally.

New: Add information about dealing with merge conflicts

Could be added somewhere on this page: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/BugfixingAZ/Index.html#

Typical problems:

gerrit-merge-conflict

cherry pick:

peters@t3coredev$ git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/70/56470/8 && git cherry-pick FETCH_HEAD
From https://review.typo3.org/Packages/TYPO3.CMS
 * branch                  refs/changes/70/56470/8 -> FETCH_HEAD
error: could not apply e1fe3c7cff... [BUGFIX] Change datatype of hash fields in index_words table
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

  • Is the "rebase" button on gerrit in any way useful?
  • Hints for rebasing and resolving merge conflicts

Make chapter about forge also for non-devs

The guide is mostly targeted for developers but the section on "Reporting a Bug" etc. would be really useful for people reporting bugs.

Not much needs to be changed here, most of the text is generic.

For the parts that are specific we could add extra sections for developers + non-devs. (issue reporters).

Sample text snippets:

  • Be up to date: "First of all you should make sure that the bug does exist on the latest TYPO3 version; we always recommend you to upgrade your TYPO3 environment to the latest release of the LTS version you use (see here and there and there where to download it, how to update etc etc)"

Provide steps to setup TYPO3 installation

How to setup a running TYPO3 installation is missing in this guide.

Could be placed in the new chapter Setup/SetupTypo3.rst

While this is probably something that everyone knows how to do who is advanced enough to contribute to TYPO3, it might be good to provide a quick overview and and least one recommended procedure with basic steps (e.g. docker, TYPO3 homestead, ddev ...).

Contrib Guide: Migrate things from TYPO3 wiki

When moving please make sure to always:

  • add a link to new content
  • always add {{delete}} and {{outdated}}

Later (or where it is a no-brainer and it is certain it can be deleted, this can be done right away):

  • request a redirect
  • delete page

see for information about migrating: https://wiki.typo3.org/WikiMigration

Important: Some of the pages in the Wiki still contain useful information that is not yet documented in the Contribution Guide. Do not just delete the Wiki pages! Read them carefully and check if there is still text that is worth saving and migrating to the current contribution guide on docs.typo3.org!

Pages in wiki about core contribution:

git:

gerrit:

PhpStorm

misc:

About releasing a version

Proposal: Add "new contributors welcome" section

Not sure where this could go, but it might point out that new contributors are welcome, include some tips for new contributors and pointers to issues that are easily solvable, e.g.

Should be checked with core team first ...

In description of setup etc. it would be good to group steps by system / user / site / branch

Some things need to be done once only once per

  • system (e.g. installation)
  • user (e.g. git user.name and user.email)
  • site /TYPO3 installation / git repo (e.g. install git hooks)
  • branch
  • after every pull, checkout, cherry-pick etc. (e.g. composer install)

It might be a good idea to go through the manual and group these steps very clearly into subsections.

P.S. I haven't really thought this through and checked it myself, just something to keep in mind and review the manual accordingly.

Describe how to install yarn

I had a case today, that a user using ubuntu 18.04 tried to follow the guide
https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/Appendix/SettingUpTypo3Ddev.html on a fresh machine (no yarn installed yet).

and failed on the yarn install because ubuntu suggests wrong way of installing yarn.

$ cd Build
$ yarn install
Command 'yarn' not found, but can be installed with:
sudo apt install cmdtest

$ sudo apt install cmdtest

$yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
$yarn build
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'build'

According to https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install
using cmdtest package suggested by ubuntu is not correct, but yarn should be installed using npm.

Commit message format is described in 2 places

  1. https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/latest/Setup/Git/CommitMessageFormat.html

  2. https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/latest/Appendix/GeneralTopics/CommitMessage.html

Also, is this really good to have it in Setup? Setting up the commit message template is setup, the rest is not. Maybe should be moved to "Fixing a bug"?

We could use Include commit-message.txt in 2 places, but I think it is better to not have duplicates at all.

P.S. Please wait for my pending PR which I will upload in a couple of days / 2 weeks. This will probably take care of most of the still pending issues.

Add section about writing and running Javascript tests

A section about the JavaScript / TypeScript setup is missing - should also contain information about how to run the tests / build.

todos:

  • Add information about location of TypeScript / SCSS files : in Build/....
  • add information about building JavaScript / CSS files (refer to runTests.sh: buildCss, buildJavascript)
  • add information about checking / testing TypScript / JavaScript / SCSS: refer to runTests.sh: lintTypescript, lintScss

Add chapter: Setting up Phpstorm

Should include:

  • general setup
  • setting up for Coding Guidelines
  • recommended plugins
  • setting up for writing tests
  • setting up with Xdebug

P.S. I am already working on a PR for this.

Add quickstart section

The logger chapter starts with a subchapter "quickstart" which walks you through the most basic stuff. After that the more detailed information follows.

I think this would be a good idea for the contribution guide. Most contribution guides of other projects are:

  • much shorter
  • have everything that is necessary on one page

While our guide is better in some ways because you can jump directly to a section via the menu and search, it might be a good idea to have a basic 1-2-3 step walkthrough for fast learners or people who know the basic stuff but just need to look up a command.

Inspiration:

Document command-line tool git review?

The tool can make it easier to use Gerrit. Test the tool and possibly document it. (install with pip is possible)

https://www.mediawiki.org/wiki/Gerrit/git-review

Test: Usage unter Linux

Install

e.g. Ubuntu

apt-get install git-review

setup

In local TYPO3 git working directory:

git review -s
Could not connect to gerrit.
Enter your gerrit username: speters
Trying again with ssh://[email protected]:29418/Packages/TYPO3.CMS
Enter passphrase for key '/home/sybille/.ssh/id_rsa': 
Creating a git remote called 'gerrit' that maps to:
	ssh://[email protected]:29418/Packages/TYPO3.CMS

This repository is now set up for use with git-review. You can set the
default username for future repositories with:
  git config --global --add gitreview.username "speters"

As suggested by git review :

git config --global --add gitreview.username "speters"

Sample usage

cherry-pick change 57131

git review -x 57131

Optimize order of related chapters

In the Contribution Guide there is a chapter “Setting up your frontend build toolchain” that assume an already installed source that is described at a later point.
Maybe split the chapter “Prerequisites and useful tools” into “Prerequisites” and “Useful tools” and then put “Setting up your Git environment” between “Prerequisites” and “Useful tools”.

Merge information about Gerrit, reviewing / testing patches and improving patches

Currently, there is some overlap of information, specifically in:

This information could be merged into one chapter and duplicate information removed.

Additionally, the page on Gerrit might be changed to be more consistent with the rest of the guide, specifically:

  • The rest of the guide is structured in a way that the information is supplied in the order that a contributor needs it. In the case of the Gerrit chapter, it contains a lot of info on reviewing a patch, which most likely will be done after someone submits a patch. Currently the reader is confronted with a lot of details before he needs it. Most likely, they just want to create a patch. So it is probably better to move this chapter to after "Fixing a bug"

Make page "Creating a patch" ("Fixing a bug") more readable

The page Creating a patch (formerly: "Fixing a bug") has grown over time and is now pretty long. It contains a number of steps and extra information that don't necessarily always need be performed (e.g. changing a patch with git commit --amend or adding to the changelog) or that were already explained elsewhere (e.g. coding guidelines). The use of sections and subsections makes it hard to sort out (at first glance when browsing the page) what is a section and what is a separate step in a section.

Suggestion: Do one or more of the following

  • move the stuff that is already documented elsewhere and just add a link (coding guidelines, changing a patch: git commit --amend)
  • Make the sections more easily distinguishable from each other, for example by using separate pages instead of having everything on one page
  • Possibly move the longer section about documentation (changelog) as a separate chapter in the top level, as was done with "Testing the core"
  • If something involves several steps, possibly use the styled numbered lists as in https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Account/GerritAccount.html

Section "git for Windows" in Appendix is outdated

  • [Git for Windows](https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/Windows/GitForWindows.html#commit-hook still uses git hook on typo3.org)
  • if there is a seperate setup instruction for Windows, it should at least be mentioned on general git setup page?
  • "Its strongly recommended to use the Git Bash on Windows as shown in previous chapters. We experienced issues with powershell etc. and some commands described in the documentation only work in Git Bash." on page Troubleshooting for Windows should perhaps also be mentioned on "Git for Windows" page, or rather in setup section?
  • Are there some general hints that should be given for Windows users in advance? Mention that in Setup section.
  • "You can read about the why and where of the pre-commit hook here." (Git for Windows: That is not correct. It is the commit-msg hook, not the pre-commit hook.

Add cross-references for yarn

Reduce documentation for reporting an issue + and add help for common problems

https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/ReportingAnIssue/Index.html

Is a bit long. Perhaps we should reduce it to the main points people are usually struggling with. For me that has been (among others):

  • how to make issues readable?
  • how to add inline images (and make the issue readable, e.g. resize image)
  • how to edit description after creating issue. It took me at least 3 years to find out ... (how: click "Edit" on top, then click on "Edit" next to description)
  • access rights - how and when are they granted?

In that case it might be grouped more like an FAQ and the general (short) description separate.

Changes required for GitHub repo rename to typo3/typo3

Start, once repo on GitHub has been renamed (should be July 19, 2021) ,,,

Before
The basic flow used to look like this:

git clone git://git.typo3.org/Packages/TYPO3.CMS.git .
git config url."ssh://<YOUR_TYPO3_USERNAME>@review.typo3.org:29418".pushInsteadOf git://git.typo3.org
git config remote.origin.push +refs/heads/master:refs/for/master

After
The recommended—new—way of doing this is:

git clone git://github.com/typo3/typo3 .
git config remote.origin.pushurl "ssh://<username>@review.typo3.org:29418/Packages/TYPO3.CMS.git"
git config remote.origin.push +refs/heads/master:refs/for/master


https://typo3.org/article/renaming-the-typo3-github-repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.