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

Enable files view to work when project is located in subdirectory #1954

Open
wants to merge 1 commit into
base: sagerb-use-project-dir-for-files
Choose a base branch
from

Conversation

sagerb
Copy link
Collaborator

@sagerb sagerb commented Jul 12, 2024

Intent

Closes #1854 (Use selected Deployment's projectDir to list files and include/exclude)

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

After everything was updated to pass in the projectDir from the activeContentRecord, adding and removing files from the config.Files section would not work correctly when the project was not located at the top root dir that VSCode had opened.

This was because the files API returned an ID that included the projectDir, and this was an incorrect value for the config file. I've created issue #1950, but this PR implements a simple workaround that removes the projectDir from the path represented in the id of a file.

Automated Tests

Directions for Reviewers

Make sure you can add and remove exclusions from the files view, with the selected configuration being updated, and the files view updating to show the result.
Also make sure you can update the config file directly, and the files view is updated correctly.

Need to verify this for both projects that are opened directly as well as projects that exist below the main folder opened within VSCode.

@sagerb sagerb self-assigned this Jul 12, 2024
@sagerb sagerb changed the base branch from main to sagerb-use-project-dir-for-files July 12, 2024 01:10
Copy link
Collaborator

@dotNomad dotNomad left a comment

Choose a reason for hiding this comment

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

Definitely agree that we should use the backend for this. I'm wondering exactly how this will work or if the API will just need to adjust to take non-relative paths. Approving before figuring this out to keep the PR chain moving - especially since you already have a follow-up task.

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.

Use selected Deployment's projectDir to list files and include/exclude
2 participants