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

Add warning if selected config has type = 'unknown' #2533

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dotNomad
Copy link
Collaborator

This PR adds a new warning if the selected configuration has type = 'unknown' now that it is a valid type in the schema due to the work in #2423.

Preview

CleanShot 2025-01-14 at 10 42 18@2x

I'm very open to suggestions regarding the text for the warning.

Intent

Resolves #2515

Type of Change

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

User Impact

When a selected configuration has type = 'unknown' the user will now see a helpful warning (similar to our others like duplicate environment variable names warning).

This can occur either through a manual change, but also if inspection isn't able to reason about the type and the initial configuration defaults to type = 'unknown'.

@@ -80,6 +80,19 @@
>Edit the Configuration</a
>.
</p>

<p v-if="home.config.active.isUnknownType">
The selected Configuration has an unknown type.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The selected Configuration has an unknown type.
Please set the framework type:

Something slightly more active + describing it as "framework type" might be more helpful for folks. The type hinting will tell them what the values are once they get there (so long as they have evenbettertoml installed), but maybe even tossing in an example?

Copy link
Collaborator

Choose a reason for hiding this comment

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

And FWIW my suggestion there I'm not super excited about please do feel free to wordsmith

Copy link
Collaborator

Choose a reason for hiding this comment

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

The experience of manually updating a configuration from an "unknown" inspection result into a valid one is a rough road. If you haven't tried it, you can recreate the lovely experience by selecting a python file from a hello world example.

Building on what @jonkeane was suggesting, but also considering that we try to keep that text short when warnings/errors are displayed, perhaps you could display a helpful message with further explanation off of an anchor in the warning? I'm visualizing the link opening a modal notification in the center of the IDE with the additional directions, with an OK button to dismiss.

@dotNomad dotNomad force-pushed the dotnomad/unknown-type-warning branch from 7e8379d to 2801428 Compare January 15, 2025 00:59
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.

Add warning in sidebar when type = 'unknown'
3 participants