Comments

thalles created an issue. See original summary.

thalles’s picture

Status: Needs work » Needs review
StatusFileSize
new101 bytes

Follow the patch!

  • thalles authored ca1ab12 on 8.x-1.x
    Issue #3054052 by thalles: Rename README.txt to README.md
    
thalles’s picture

Status: Needs review » Fixed
gausarts’s picture

Status: Fixed » Needs work

You are too quick ;)

Good idea, thank you!

This file was referenced elsewhere in the codebase, we must update them accordingly to avoid missing references:

$ grep -R "README.txt" ./slick
./slick/slick_ui/src/Form/SlickFormBase.php:    $readme    = Url::fromUri('base:' . $path . '/README.txt')->toString();
./slick/slick_ui/src/Form/SlickForm.php:        'description' => $this->t('Leave empty if using sub-modules to have it auto-matched. Set the slider to be the navigation of other slider (Class or ID Name). Use selector identifier ("." or "#") accordingly. See HTML structure section at README.txt for more info. Overriden by field formatter, or Views style.'),
./slick/slick_ui/README.html:its README.txt. Spending 5 minutes or so will save you hours in building more<br />
./slick/slick.api.php: *       // @see src/Plugin/Field/README.txt
./slick/slick.api.php: *         // @see src/Plugin/Field/README.txt for the supported layout keys.
./slick/src/Form/SlickAdmin.php:    $readme       = Url::fromUri('base:' . $path . '/README.txt')->toString();
./slick/src/Form/SlickAdmin.php:    $readme_field = Url::fromUri('base:' . $path . '/src/Plugin/Field/README.txt')->toString();
./slick/src/Form/SlickAdmin.php:      $form['skin']['#description'] = $this->t('Skins allow various layouts with just CSS. Some options below depend on a skin. However a combination of skins and options may lead to unpredictable layouts, get yourself dirty. E.g.: Skin Split requires any split layout option. Failing to choose the expected layout makes it useless. See <a href=":url" target="_blank">SKINS section at README.txt</a> for details on Skins. Leave empty to DIY. Or use hook_slick_skins_info() and implement \Drupal\slick\SlickSkinInterface to register ones.', [':url' => $readme]);

If you do this, you must also update the rest of .txt files to get consistent with the new intention.
If I were you, I would leave it alone, as we already have 2.x branch which already has .md files in place.
But feel free to go ahead on this, but please just update the references as needed. Thank you!

thalles’s picture

I do in 1.x because in 2.x it's inside docs, so I wanted to check with you before

gausarts’s picture

2.x is fine, I think, we can leave it alone inside docs to de-clutter a bit.

With 1.x as an .md file, it is not any better:
https://git.drupalcode.org/project/slick/blob/8.x-1.x/README.md#features
https://git.drupalcode.org/project/slick/blob/8.x-1.x/README.md#known-is...

It is now harder to read than before.

Perhaps if you have time later, not necessarily now, you may want to reformat the texts with the correct markdowns as well.

gausarts’s picture

2.x was already correct, I think:

$ grep -R "README.md" ./slick
./slick/slick_ui/slick_ui.module:    $output = file_get_contents(dirname(dirname(__FILE__)) . '/docs/README.md');
./slick/slick_ui/src/Form/SlickForm.php:    $readme    = $is_help ? Url::fromRoute('help.page', $route)->toString() : Url::fromUri('base:' . $path . '/docs/README.md')->toString();
./slick/docs/README.md:**/admin/help/slick_fields** or **slick_fields/README.md**.
./slick/src/Form/SlickAdmin.php:    $readme       = $is_slick_ui && $is_help ? Url::fromRoute('help.page', $route_name)->toString() : Url::fromUri('base:' . $path . '/docs/README.md')->toString();

There are still .txt references at 2.x, but they are mostly not referenced by functions. We can correct it later as well, but not crucial. We must skip the CHANGELOG.txt part, of course.

$ grep -R "README.txt" ./slick
./slick/slick_ui/src/Form/SlickForm.php:        'description' => $this->t('Leave empty if using sub-modules to have it auto-matched. Set the slider to be the navigation of other slider (Class or ID Name). Use selector identifier ("." or "#") accordingly. See HTML structure section at README.txt for more info. Overriden by field formatter, or Views style.'),
./slick/CHANGELOG.txt:- Updated README.txt, and minor adjustments.
./slick/slick.api.php: *       // @see src/Plugin/Field/README.txt
./slick/slick.api.php: *         // @see src/Plugin/Field/README.txt for the supported layout keys.
thalles’s picture

Follow fix in references.

gausarts’s picture

Thank you!

One left over, perhaps:
https://git.drupalcode.org/project/slick/blob/8.x-1.x/src/Plugin/Field/R...

Consider renaming it as well?
feel free to commit it once the last file is renamed. Thanks again!

thalles’s picture

Status: Needs work » Needs review

But gitlab shows readme.md automatically.

gausarts’s picture

It is still .txt for the last mentioned file at 1.x branch:
https://git.drupalcode.org/project/slick/blob/8.x-1.x/src/Plugin/Field/R...

thalles’s picture

  • thalles authored c151868 on 8.x-1.x
    Issue #3054052 by thalles: Rename README.txt to README.md
    
thalles’s picture

Status: Needs review » Fixed

Thanks for your help @gausarts!
Fixed!

gausarts’s picture

My pleasure, but I do thank you ;)

thalles’s picture

What do you think of putting a readme.md in the root just to reference the docs directory with links, in branch 2.x?

gausarts’s picture

I would prefer keeping it inside docs simply to de-clutter for now unless you have a compelling reason, of course.

thalles’s picture

I think the project page with visible documentation is cool, but that's all.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.