Skip to content

Add title option to plot wizard #4786

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

Merged
merged 25 commits into from
Oct 10, 2023
Merged

Add title option to plot wizard #4786

merged 25 commits into from
Oct 10, 2023

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Oct 9, 2023

1/2 main <- this <- #4787

Demo

https://github.com/iterative/vscode-dvc/assets/43496356/fba2492e-c6e4-4e85-bd1b-2b0da36ecda0

Screen.Recording.2023-10-10.at.7.52.43.AM.mov

Part of #4654

@julieg18 julieg18 added the 📦 product Needs product input or is being actively worked on label Oct 9, 2023
@julieg18 julieg18 self-assigned this Oct 9, 2023
@julieg18 julieg18 changed the base branch from main to improve-plot-wizard-err-handling October 9, 2023 14:32
@julieg18 julieg18 marked this pull request as ready for review October 9, 2023 15:45
Base automatically changed from improve-plot-wizard-err-handling to main October 9, 2023 16:22
@julieg18
Copy link
Contributor Author

julieg18 commented Oct 9, 2023

The test coverage on the diff in this pull request is 86.3% (85% is the threshold).

Not sure why the test coverage is so low, everything seems to be tested for unless I'm missing something 🤔

const template = await quickPickOne(PLOT_TEMPLATES, 'Pick a Plot Template')

if (!template) {
return
}

const title = await getInput(Title.ENTER_PLOT_TITLE, `${template}_plot`)
Copy link
Contributor

Choose a reason for hiding this comment

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

[C] If you move this to after the selection of files/variables then we could provide a more meaningful default.

Copy link
Contributor

Choose a reason for hiding this comment

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

i.e ${x} vs ${y} or ${filename}.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[C] If you move this to after the selection of files/variables then we could provide a more meaningful default.
i.e ${x} vs ${y} or ${filename}.

We could do that, but wouldn't we have to add extra checks if the user has selected multiple files or variables? Seems simpler to just keep a basic default, but if you think it would be valuable to have the name be more meaningful, I can update the code to use an updated title if the user has only chosen two metrics 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO ${x[0]} vs ${y[0]} would still be a better default and not too hard to do. ${template}_plot really isn't meaningful.

Copy link
Contributor

@mattseddon mattseddon Oct 10, 2023

Choose a reason for hiding this comment

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

An alternative would be to not provide a default and let the user skip the title step by entering empty string. Would need to make this clear in the UI. Could probably do this by adding placeholder text instead of a default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense! I'll use ${x[0]} vs ${y[0]} as a default.

@mattseddon mattseddon added product PR that affects product and removed 📦 product Needs product input or is being actively worked on labels Oct 9, 2023
@julieg18 julieg18 enabled auto-merge (squash) October 10, 2023 15:22
@codeclimate
Copy link

codeclimate bot commented Oct 10, 2023

Code Climate has analyzed commit 9598ee7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 89.4% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.0% (0.0% change).

View more on Code Climate.

@julieg18 julieg18 merged commit 0226b4c into main Oct 10, 2023
@julieg18 julieg18 deleted the add-title-opt-to-plot-wizard branch October 10, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants