? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
30 Jul 2020

Summary of Changes

Adds JSON to .editorconfig to use 2 space indents instead of 1 tab.
Formats some JSON files.

Testing Instructions

Open any JSON file in the repository.
Notice that 2 space indentation is used.

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 30 Jul 2020
avatar SharkyKZ SharkyKZ - change - 30 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2020
Category Repository Front End Plugins
avatar richard67
richard67 - comment - 30 Jul 2020

Open any JSON file in the repository.

@SharkyKZ You mean here on GitHub with their built-in editor? And edit a bit without saving, just to see if new lines are indended in the right way? Sorry if it's a silly question, but up to now I never cared about .editorconfig and what editor it is good for ;-) Update: Found it out, see test result below. All fine.

avatar richard67 richard67 - test_item - 30 Jul 2020 - Tested successfully
avatar richard67
richard67 - comment - 30 Jul 2020

I have tested this item successfully on bdecd0b

Found it out:

Edit a json file in the 4.0-dev branch on GitHub. Add some new code, e.g. new curly opening bracket, and after that some code, and then closing curly bracket, or anything for which you expect a clever editor who knows about the syntax of json to do the right indent automatically.

Result: Indent for 1 level is one tabulator.

Now edit some json file in the branch of this PR and check automatic indent in the same way.

Result: Indent for 1 level is two spaces.

Finally checked changes in the json files by code review. All fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30228.

avatar richard67
richard67 - comment - 30 Jul 2020

Hmm, just thinking about it further: 1 tab is 1 byte, 2 spaces are 2 bytes ... don't we blow up the files with this change? ;-) (joking)

avatar jmeintrup jmeintrup - test_item - 3 Aug 2020 - Tested successfully
avatar jmeintrup
jmeintrup - comment - 3 Aug 2020

I have tested this item successfully on bdecd0b

Tested with PhpStorm 2020.2 and VSCode 1.48.0-insider

Before Patch:

  • Both editors used tabs as default behaviour when editing .stylelintrc.json or plugins/editors/codemirror/fonts.json

After Patch:

avatar richard67 richard67 - change - 3 Aug 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 3 Aug 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30228.

avatar richard67 richard67 - change - 3 Aug 2020
Labels Added: ? ?
avatar HLeithner HLeithner - change - 3 Aug 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-08-03 13:04:00
Closed_By HLeithner
Labels
avatar HLeithner HLeithner - close - 3 Aug 2020
avatar HLeithner HLeithner - merge - 3 Aug 2020
avatar HLeithner
HLeithner - comment - 3 Aug 2020

Thanks

Add a Comment

Login with GitHub to post a comment