Suggesting corrections and examples for good practices

During a Craft Workshop, the team has the opportunity to identify new good practices based on its own code. The team members will then tag their code as « positive » or « negative » so it can be discussed during the review.

 

Best practices corrections

When introducing a « negative » tag, the developer can suggest a correction by clicking on the « Suggest a correction » button.

 

Capture_d_e_cran_2020-06-16_a__12.06.00.png

 

When clicked, this button will display a new interface allowing the existing code to be modified in order to suggest a correction that will be associated with this example.

 

Capture_d_e_cran_2020-06-16_a__12.23.54.png

 
This new interface can be broken down into 4 parts:

  1. This section displays the original file that is not editable.
  2. This part also displays the original file but in an editable version.
  3. When editing in Part 2, the edited lines of code will be highlighted.
  4. When the editing is complete, the developer can save the correction by clicking on the « Save » button.

Tricks:

  • If you wish to reset some of your changes to the original version, simply click on the arrow displayed between sections 1 and 2.
  • If you wish to enlarge part 2 allowing you to write your correction, just click on the "Hide" button to hide the original file.

Once the first correction is suggested, the interface will evolve allowing developers to:

  1. Browse the different corrections suggested for this tag.
  2. Bookmark a correction so that it always appears first in the list of suggested corrections.
  3. Delete an existing correction.
  4. Save changes made to an already existing correction.
  5. Save the changes as a new correction.

 

Capture_d_e_cran_2020-06-16_a__14.17.03.png

 

Best practices examples

During the review of a Craft Workshop, the team will have the opportunity to select some « positive » and/or « negative » good practice tags as examples that will be displayed in the good practice section. To do so, simply click on the « Example » button.

 

Capture_d_e_cran_2020-06-16_a__14.28.50.png

 

Once the « positive » and/or « negative » examples of a good practice have been selected, they will be directly accessible in the « good practices » section of Themis or in the description modal of a practice:

  1. Select the « good practices » section in Themis.
  2. Displays an overview of the « negative » examples selected for a good practice.
  3. Displays an overview of the « positive » examples selected for a good practice.
  4. It is possible to directly propose/view a correction for the example.

 

Capture_d_e_cran_2020-06-16_a__14.37.29.png

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.