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 a tooltip suggesting to add trailing commas #2980

Closed
galeyang opened this issue Dec 19, 2018 · 5 comments
Closed

Add a tooltip suggesting to add trailing commas #2980

galeyang opened this issue Dec 19, 2018 · 5 comments
Labels
Milestone

Comments

@galeyang
Copy link

From a recent UX study, one participant was frustrated by the reformat feature, because it didn’t always work with her programming style, i.e., not using trailing commas.
image

New Flutter user may not know --

optional trailing commas help the automatic formatter to insert an appropriate amount of line breaks for Flutter-style code.

Can we add a tooltip suggesting to add trailing commas?

cc: @jayoung-lee @InMatrix

@pq
Copy link
Contributor

pq commented Dec 19, 2018

This is a great idea. If we agree that this should be enforced for Flutter projects generally, I'd say we implement a lint rule and add it to the template for new Flutter projects. If we get even more ambitious we could implement a quick fix in the analysis server which adds the trailing commas on demand too. 👍

@pq pq added this to the On Deck milestone Dec 19, 2018
@jaumard
Copy link

jaumard commented Jan 3, 2019

Yes having an option on plugin settings to fix this automatically would be awesome :)

@pq
Copy link
Contributor

pq commented Jan 3, 2019

I opened a lint request dart-lang/linter#1338; feedback there welcome! 👍

@InMatrix
Copy link

As a simpler alternative to lint rules, can we consider showing a tip in a dialog window when the user tried to format code that misses trailing commas? We could potentially reuse the Tip of the Day dialog in IntelliJ. WDYT? @pq

@InMatrix InMatrix added the from: study Reported in a UX study. label Aug 13, 2019
@jwren
Copy link
Member

jwren commented May 15, 2024

Closing this issue, dart-lang/linter#1338 is closed.

@jwren jwren closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants