Skip to content
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

Adds DrupalPod vscode extension #27

Merged
merged 19 commits into from
Sep 2, 2021
Merged

Conversation

mradcliffe
Copy link
Contributor

@mradcliffe mradcliffe commented Jul 30, 2021

The Problem/Issue/Bug

Novice contributors or contributors new to DrupalPod should have a Welcome or Startup page for how to use DrupalPod to contribute to Drupal Core and Contrib. This should augment the Community Contribution Guide on drupal.org.

How this PR Solves The Problem

Adds a vscode drupalpod-ext extension that can be published on OpenVSX and added to .gitpod.yml.

Remaining tasks

  • Initial extension scaffold
  • Adds an initial guide
  • Adds a OpenVSX / VISX publish + unit test GitHub Actions
  • Adds the extension name to .gitpod.yml
  • Opens command on startup

Manual Testing Instructions

Until there's a published extension,

  1. Launch DrupalPod
  2. In Terminal:
    1. cd src/vscode-extension/drupalpod-ext/
    2. yarn install
    3. yarn package
  3. Go to the Extensions tab
  4. Press Views and More Actions button (...) > Install from VSIX...
  5. Browse to src/vscode-extension/drupalpod-ext/ and choose drupalpod-ext-0.0.2.vsix
  6. Open the Command Pallette
  7. Run > Drupal: Getting Started Contributing with DrupalPod

See the src/vscode-extension/drupalpod-ext/README.md file

Related Issue Link(s)

Release/Deployment notes

@gitpod-io
Copy link

gitpod-io bot commented Jul 30, 2021

@mradcliffe
Copy link
Contributor Author

Thinking about the content, I think an initial resolution for this PR would be a non-interactive tour, but ideally we could create something as fancy as we want. We can assume the Gitpod environment.

I think for a basic thing, hard-coding html is fine, but we could pull in remarkable (or markdown-it) as a dependency of the extension if we want to render from markdown files. Or do a fancy CSS Grid image/icon map / menu to link to sections of a document.

Here's what I came up with for an outline of a basic tour from my memory of the DrupalPod demo. What do you think?

Getting Started with DrupalPod

  1. Tell the user to wait until Terminal ⬇️ is finished and Drupal installer to the right 🔜.
  2. Simple Browser ➡️ you can install and use Drupal from the Simple Browser. Go ahead and install Drupal now. You will use "db" as the username, password, database name and host (Advanced Options) using the MariaDB option.
  3. Files ⬅️ Can access and modify files in Drupal core and contrib by going expanding the "repos" directory
  4. Remote Explorer ⬅️ Shows the services provided by DrupalPod. Find the 8080 item in the list, clicking the "globe" icon button will open the site in a new browser tab. Clicking the "Open Preview" icon button will open the site in the Simple Browser.
  5. Terminal ⬇️ Can use the terminal to run git, ddev and drush. Let's use it to setup your SSH access if you have not done so already.
    • Run the following command in the Terminal, .gitpod/drupal/ssh/00-interactive-ssh-setup.sh and then follow the instructions in the tab that appears.

What's Next?

  • Join us on Drupal Slack (d.o. link) in the #contribute channel
  • Find a Contributor Task (d.o. link) in the Contributor's Guide (d.o. link)
    • Manually test an issue
    • Write a patch / contribute to an issue fork/merge request
    • Write an automated test
    • Find your role (d.o. link) or skill (d.o. link) to learn more about how to contribute.

@mradcliffe
Copy link
Contributor Author

do you think the following tasks should be follow-ups once the extension is in the repo so that it can be published and updated initially?

Adds a OpenVSX / VISX publish + unit test GitHub Actions 
Adds the extension name to .gitpod.yml

Then the extension is technically usable by installing it manually.

@mradcliffe mradcliffe marked this pull request as ready for review August 14, 2021 14:20
@mradcliffe mradcliffe changed the title WIP: DrupalPod vscode extension Adds DrupalPod vscode extension Aug 14, 2021
@mradcliffe
Copy link
Contributor Author

What's a good alternative directory for vscode and/or browser extension source?

@shaal
Copy link
Owner

shaal commented Aug 14, 2021

What's a good alternative directory for vscode and/or browser extension source
What do you think about DrupalPod/ directory? or src/ directory?

@mradcliffe
Copy link
Contributor Author

Is src/ already used by composer PHP files?

Maybe .gitpod/DrupalPod or DrupalPod?

@shaal
Copy link
Owner

shaal commented Aug 14, 2021

src/ currently used for setting up Drupal core contributions, but can be moved to src/core-compoare or something

@bsnodgrass
Copy link

bsnodgrass commented Aug 26, 2021

Nice work... Looking at this as a new contributor I expect the links in the Getting started Contributing to Drupal to open somewhere, right click I only have the option to Cut or Copy.

Your comment above seems like you are already thinking of this and the content is still being looked at.

@shaal
Copy link
Owner

shaal commented Aug 26, 2021

@mradcliffe I propose the following file structure, under src/, divided to these main directories

  • browser-extension
  • composer
  • vscode-extension

And full structure here:

src
├── browser-extension
│   └── drupalpod-browser-extension
│       ├── css
│       │   ├── options.css
│       │   └── popup.css
│       ├── icons
│       │   ├── DrupalPod-128.png
│       │   └── DrupalPod-128x128.png
│       ├── LICENSE
│       ├── manifest.json
│       ├── options.html
│       ├── popup.html
│       ├── README.md
│       └── scripts
│           ├── background.js
│           ├── options.js
│           └── popup.js
├── composer
│   └── ComposerScripts.php
└── vscode-extension
    └── drupalpod-ext
        ├── CHANGELOG.md
        ├── package.json
        ├── README.md
        ├── src
        │   ├── extension.ts
        │   ├── help-content.ts
        │   └── test
        │       ├── runTest.ts
        │       └── suite
        │           ├── extension.test.ts
        │           └── index.ts
        ├── tsconfig.json
        └── yarn.lock

What do you think?

@mradcliffe
Copy link
Contributor Author

That makes a lot of sense. I moved the files and fixed the current merge conflict with #30 .

@shaal shaal merged commit b8310c9 into shaal:main Sep 2, 2021
@shaal
Copy link
Owner

shaal commented Sep 2, 2021

@mradcliffe Thank you!! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants