andy-blum / drupal-smart-snippets

This extension adds rich language support for Drupal Hooks, Services, and Render Elements to VS Code.
https://marketplace.visualstudio.com/items?itemName=andrewdavidblum.drupal-smart-snippets
MIT License
21 stars 4 forks source link

feat: add Drupal form & render element snippets #16

Closed g-brodiei closed 1 year ago

g-brodiei commented 1 year ago

closes #1

This PR attempts to provide scrape_element.js to scrape renderable elements under web/core/lib/Drupal/Core/Render/Element and stores as element.json snippet for the ease of form/render element usage.

All elements rendered will automatically append properties from docblock of each file. Additionally, FormElement will have four extra properties by default.

Gif demos are provided in README.md

andy-blum commented 1 year ago

Oh, wonderful! I'll review this ASAP!

andy-blum commented 1 year ago

I merged the refactor PR, so please make sure to merge those changes in here.

g-brodiei commented 1 year ago

Refactored the scrape_element.js into index.js and separated into relative files by your clear comments!

andy-blum commented 1 year ago

Thanks for the refactor! I'll take a look at this soon.

g-brodiei commented 1 year ago

Changes are made, thanks for giving such helpful suggestions.

Made changes so it's testable locally, awaiting for your responses, thanks 👍