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
Add a Sample Engine with Schema Support to Pattern Lab #1005
Comments
This would be very cool |
We've also done some prior work in this direction in the Bolt Design System (albeit, we're still using Pattern PHP till we migrate over) but same overall idea with component schemas + multiple ways to consume and take advantage of that schema data: https://boltdesignsystem.com/pattern-lab/?p=viewall-components-button |
@cybtachyon is there a more up to date URL of this working in Pattern Kit? The link in the original ticket's description is broken 🙁 |
Im sorry. That was my patternkit url from many years ago. I have since cancelled that domain and hosting |
I'll attempt to see if we can publish our internal Pattern Kit URL - it may have sample data that's more internal-oriented and not anonymized enough. Worst case I'll spin up a new instance with a sample set of patterns - or even better get a PR up ;) |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
Shhh stale bot. This is actively being worked on at Red Hat. |
This is the library we are improving and working on integrating: https://github.com/json-editor/json-editor |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
fight the bot ! |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
Bump! |
Appreciate the bump. We have a team with this as a task, however there's a ton on our plate so this has not been slotted for release yet. |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
Bump |
@cybtachyon, that‘s probably one of the coolest new features for the product. Do you even already have an ETA for that? Do you need any support? |
I agree! Thanks so mcuh. I have no ETA right now as the pandemic situation has drastically reset our team's priorities. I may return to pattern ecosystem development this week but it's up in the air right now. Here's the library we're using: https://github.com/json-editor/json-editor |
I’d like to open another discussion on this topic. Managing the schema of a pattern would be at least relevant for three reasons / use cases:
These aspects are quite nicely comparable with Custom Elements, that could as well be seen as a successor (at least equivalent) to what we’re doing regarding custom pattern development in general. So I thought about having a looking into that field and the existing technical solutions that are being build around those challenges. Two of the more prominent tools seem to be, that work quite nicely in combination:
Thinking out loudly, what about using api-viewer-element for displaying the sample engine? We would need to use the web-component-analyzer In other words, I do like the solution that json-editor could provide, but I'm thinking about whether it "only" enables the UI for a sample engine regarding the schema files, or does it (or some other even already implemented solution, like in Bolt Design System) even also achieve the second and third goals (pattern specification and IDE schema files)? Or would it make sense to have a second look at other options like the ones I’ve provided? |
I love the direction you're taking with this. The issue I have with...
...is that JSON Schema is already a well-documented and popular format for providing schemas. Instead, I would take the tact of adding JSON Schema support for web-component-analyzer. JSON Schema was our choice for a couple reasons:
That said, I'm not against making the whole pattern schema and editor system pluggable so that multiple systems could be supported and used - in fact, that's how I'd prefer to implement it, with the default being JSON Schema and other standards as easy drop-ins. Web technologies don't last forever, and who knows, tomorrow JSON Schema could be dropped by everyone for Protocol Buffers or some sort of standard based on rich metadata for XML attributes like you've linked above. |
@cybtachyon, sounds great! I‘ve even also just found a lot of other scripts that could help on the jsonschema2md transformation, which is an additional plus: https://duckduckgo.com/?q=%22JSON+Schema%22+to+markdown&t=iphone&ia=web |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
@cybtachyon, this is probably one of the hottest awaited features, that is additionally one of the only remaining features that Storybook is even already delivering at. |
@mfranzke you offering to pay for it? ;) The PatternLab / Knapsack Schema Editor is low priority vs the roadmap listed on https://drupal.org/project/patternkit at this time. That could shift as more sites and themes begin shipping JSON schema for their patterns, for example Microsoft's https://explore.fast.design which includes JSON schema for all of their components. |
@cybtachyon ;-) But thanks a lot for the outlook, especially regarding the acceptance and wider spread usage of JSON schema; great news regarding Microsoft especially ! Didn't notice that aspect so far. |
Hahah, for sure! Where we plan to start is by adding a pane that loads https://github.com/json-editor/json-editor into the DOM per-pattern. Basically, writing wrapping JS that instantiates an instance for each Pattern Lab pattern on the page, and then making sure config options are exposed to patternlabrc.js - from there it's making sure the schema is loaded and preset properly from any provided YML or MD sample data and that changes reflect in the component. |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
It's hard to keep track of everything. This issue has been automatically marked as stale because it has not had recent activity, neither from the team nor the community. It will be closed if no further activity occurs. Please consider adding additional info, volunteering to contribute a fix for this issue, or making a further case that this is important to you, the team, and the project as a whole. Thanks! |
As requested, moving from pattern-lab/patternlab-php-core#117
Summary:
Benefits:
To Do:
Demo of this functionality in action: http://patternkit.info/schema/keynote_quote
PatternLab already has an existing set of functionality dedicated to providing sample data via pre-configured JSON or YAML. However, it does not support easy on the fly composition and editing.
We have found that the ability to edit sample data in a GUI on the fly not only aids in pattern development, but also leads to easier demoing with stakeholders.
We propose adding support for JSON/YAML schema files that allow a GUI to provide an edit interface for populating patterns. We already have this GUI working with PatternKit and are looking at porting it over.
This issue is a part of a series to fold functionality present in the nearly identical tool PatternKit in an effort to coalesce the development communities and deprecate PatternKit in favor of PatternLab. We plan on moving forwards with development starting August 21st.
Related Reading:
@micahgodbolt was the original architect
Noting that if accepted we would also need a PR to https://github.com/pattern-lab/the-spec/ to update the spec.
The text was updated successfully, but these errors were encountered: