Skip to content

BREAKING-CHANGE: Deprecate underscore prefix #1237

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

Merged
merged 12 commits into from
Jan 5, 2021

Conversation

JosefBredereck
Copy link
Contributor

@JosefBredereck JosefBredereck commented Aug 16, 2020

Closes #1209
Closes #1182
Closes #1183

Summary of changes:

Change the way pattern lab is hiding patterns. Because all those file system hacks are not a good approach we decided to remove this functionality in favor of a more flexible way.

@JosefBredereck JosefBredereck added the breaking ❗ Use this labe if the change will break the current pattern lab behavior label Aug 16, 2020
@JosefBredereck
Copy link
Contributor Author

JosefBredereck commented Aug 18, 2020

@bmuenzenmeyer @sghoweri @engelfrost @bradfrost @mfranzke @ringods
Is it more convenient to have the companion file for pattern-groups in the folder or next to the folder?
The same question appears for patter-sub-groups.

To overcome the pattern and group name matching I consider an underscore prefix for version 1 if it is a companion .md file of the group.

Examples (Sorted like the filesystem would do)

  1. Inside the folder
_patterns/atoms/text/
_patterns/atoms/text/_text.md
_patterns/atoms/animation/
_patterns/atoms/animation/_animation.md
_patterns/atoms/_atoms.md
_patterns/molecules/blocks/
_patterns/molecules/blocks/_blocks.md
_patterns/molecules/cards/
_patterns/molecules/cards/_cards.md
_patterns/molecules/_molecules.md
  1. Next to the folder
_patterns/atoms/text/
_patterns/atoms/animation/
_patterns/atoms/animation.md
_patterns/atoms/text.md
_patterns/molecules/blocks/
_patterns/molecules/cards/
_patterns/molecules/blocks.md
_patterns/molecules/cards.md
_patterns/atoms.md
_patterns/molecules.md

!! please upvote with 🚀 if you like version 1 and with 👀 if you prefer version 2 !!

EDIT: I know we have the top-level markdown files (as documentation patterns), which apply to version 2 in this example. The problem is, those are breaking the UI even without any change in the current version that no view all pages can be generated for folders with documentation blocks. Maybe we need to rethink how everything is working together.

EDIT 2: Based on all the information I got from issues and also the spec, I can now confirm, that version 2 was somehow implemented but, on the other hand, not. References: #415, the-spec/#28 and also an old PR where I gathered some more information. I will now proceed to use version 2 since it is already implemented in some way.

@coreylafferty
Copy link

If I understand this correctly, I'm on team 🚀. Generally I think all the files for a subfolder should be in that folder so it's self-contained. In our theme we have a script that automatically generates a subfolder containing the necessary files (e.g., twig, md, scss and yml files).

@JosefBredereck
Copy link
Contributor Author

Keep in mind, this change is not for patterns. It is for groups and subgroups. But I'm totaly on you side. We also have scripts to create all required files in our company.

@JosefBredereck
Copy link
Contributor Author

See my edits on my initial question, "commented on 18 Aug.". There are some hints for testing.

@JosefBredereck JosefBredereck merged commit 030a992 into dev Jan 5, 2021
JosefBredereck added a commit that referenced this pull request Jan 7, 2021
* Rename files to match #1252 & #1237
* #1253: update dev editions
* #1253 Update doc locations
* #1253 cleanup merge bugs
* #1253 Fix view all pages are not sorted correctly
@JosefBredereck JosefBredereck deleted the feature-deprecate-underscore-prefix branch January 12, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking ❗ Use this labe if the change will break the current pattern lab behavior released 🚀
Projects
None yet
2 participants