Skip to content

feat: support glob patterns in editor.fileTree.allowEdits #332

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 9 commits into from
Sep 18, 2024

Conversation

AriPerkkio
Copy link
Member

@AriPerkkio AriPerkkio commented Sep 16, 2024

Adds support for users to specify one or multiple glob patterns in editor.fileTree.allowEdits.

---
type: lesson
title: Example
editor:
  fileTree:
    allowEdits:
      # Items in root
      - "/*"

      # Only "allowed-filename-only.js" inside "/first-level" folder
      - "/first-level/allowed-filename-only.js"

      # Anything inside "second-level" folders anywhere
      - "**/second-level/**"
---

When students attempt to create file that doesn't match these patterns, we show an error dialog:

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@AriPerkkio AriPerkkio force-pushed the feat/allow-edits-globs branch from f0542cf to c4b359b Compare September 17, 2024 11:10
@AriPerkkio AriPerkkio marked this pull request as ready for review September 17, 2024 11:24
@AriPerkkio AriPerkkio requested a review from Nemikolh September 17, 2024 11:31
Copy link
Member

@Nemikolh Nemikolh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good work on this! 🤩

Some very minor things, and let's ship this! 💪

Copy link
Member

@Nemikolh Nemikolh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! 🤩🤩

@Nemikolh Nemikolh merged commit c1a59f5 into stackblitz:main Sep 18, 2024
10 checks passed
@AriPerkkio AriPerkkio deleted the feat/allow-edits-globs branch September 18, 2024 18:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants