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

Color picker does not work #5780

Open
ghost opened this issue Sep 29, 2021 · 6 comments
Open

Color picker does not work #5780

ghost opened this issue Sep 29, 2021 · 6 comments
Milestone

Comments

@ghost
Copy link

ghost commented Sep 29, 2021

Steps to Reproduce

The color picker in the gutter does not work:

https://1drv.ms/u/s!AsFZusAnvKobgSdqPimyQvn4jzbt?e=XZwpKy

@stevemessick
Copy link
Member

I can't open that link. Please provide details of the problem here. Unless it is due to this issue noted in the release notes:

Caveat: the color picker appears for all color icons but its selection is ignored if the color is a named Material or Cupertino color.

If that's the problem, you can close this issue because we do not plan to fix it.

@stevemessick stevemessick added the waiting for customer response Auto-close if no response label Sep 29, 2021
@ghost
Copy link
Author

ghost commented Sep 29, 2021

Caveat: the color picker appears for all color icons but its selection is ignored if the color is a named Material or Cupertino color.

Yes this is it. Apparently this is the source of this statement:

https://groups.google.com/g/flutter-announce/c/V335xbsPWUs/m/14LSp05kAQAJ

Can you describe why this issue is "wont fix"? It is a usability issue and it appears to be within the limits of intellij sdk. (is it?)

@jacob314
Copy link
Contributor

I tried out this functionality and it is great when it works but there a few bugs.

Problems with the current behavior:

  1. Editing a line after it already has a color values makes the color icon stop being editable for some reason. For example, adding a const where one was missing reproduces this.
  2. Color values like Colors.red display a color picker but the value is not saved which is confusing and makes it seem like our code editing functionality is broken. I think users would prefer to save the color value even if it overrides a nice material color constant with a hex value. We can tackle fixing up color values to reuse existing color constants with a separate lint and quick fix. I would suggest we emit color values as Color(0xFFAF9299). As a bonus we could emit the color as a Colors.foo constant if the exact value matched one of the material colors but that isn't crucial for an MVP. We could also consider adding a lint and quick fix that detects any case where a user is specifying colors as raw values when there are appropriate constants. New lint rule: warn about Color constants that match existing color constants dart-lang/sdk#58525

@stevemessick
Copy link
Member

When working with named color constants, code completion works great. Making the color picker work equivalently is a lot of work, which was why I said we don't plan to fix it. We'll leave it open, though.

The reason the color picker is displayed for named colors is to provide the preview, and I couldn't find a way to disable the "picker" part of the preview. If IntelliJ adds that, then we can stop displaying the input selector. I think rewriting a named value to a hex value would be a surprising and unwelcome UX, though.

@stevemessick stevemessick added this to the Backlog milestone Oct 4, 2021
@jacob314
Copy link
Contributor

jacob314 commented Oct 4, 2021

I've moved the case of the color picker not working after local edits to #5796

jacob314 added a commit to jacob314/flutter-intellij that referenced this issue Oct 12, 2021
The color picker now auto-completes to color constants and works
even if the previous version of a color is a color constant.

flutter#5796
flutter#5780
jacob314 added a commit to jacob314/flutter-intellij that referenced this issue Oct 15, 2021
The color picker now auto-completes to color constants and works
even if the previous version of a color is a color constant.

flutter#5796
flutter#5780
jacob314 added a commit to jacob314/flutter-intellij that referenced this issue Oct 15, 2021
The color picker now auto-completes to color constants and works
even if the previous version of a color is a color constant.

flutter#5796
flutter#5780
jacob314 added a commit to jacob314/flutter-intellij that referenced this issue Mar 30, 2022
The color picker now auto-completes to color constants and works
even if the previous version of a color is a color constant.

flutter#5796
flutter#5780
@mathisgauthey
Copy link

Hey there, the issue is still hapening in IntelliJ :

IntelliJ IDEA 2024.3 (Ultimate Edition)
Build #IU-243.21565.193, built on November 13, 2024
Subscription is active until February 12, 2025.
Runtime version: 21.0.5+8-b631.16 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.wl.WLToolkit
Linux 5.15.133.1-microsoft-standard-wsl2
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 8
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
com.github.jdha.codedivider (1.0.4)
com.fwdekker.randomness (3.3.3)
some.awesome (1.16)
me.x150.intellij-code-screenshots (1.4.8)
lermitage.intellij.iconviewer (1.31.1)
net.seesharpsoft.intellij.plugins.file-preview (1.6.4)
com.intellij.plugins.vscodekeymap (243.21565.122)
com.wakatime.intellij.plugin (15.0.3)
org.intellij.RegexpTester (2.2.0)
youngstead.relative-line-numbers (1.1.1)
HighlightBracketPair (1.5.3)
com.github.patou.gitmoji (2.2.2)
com.github.lppedd.idea-conventional-commit (0.23.1)
leetcode-editor (8.14)
PythonCore (243.21565.211)
com.github.b3er.idea.plugins.arc.browser (0.32)
com.andrey4623.rainbowcsv (2.0.2)
org.jetbrains.jumpToLine (0.1.17)
com.github.texousliu.opengitmoji (231.3.0.1)
org.jetbrains.plugins.go-template (243.21565.122)
com.haulmont.jpab (243.21565.129)
com.jetbrains.jax.ws (243.21565.129)
String Manipulation (9.15.0)
org.jetbrains.plugins.localization (243.21565.122)
Key Promoter X (2024.2.2)
AceJump (3.8.19)
IdeaVIM (2.17.0)
org.jetbrains.search-everywhere-docs (1.0.12)
indent-rainbow.indent-rainbow (2.2.0)
Pythonid (243.21565.211)
com.intellij.plugin.adernov.powershell (2.8.0)
net.ashald.envfile (3.4.2)
GrepConsole (13.2.0-IJ2023.3)
org.jetbrains.plugins.gitlab (243.21565.204)
MavenRunHelper (4.29.0-IJ2022.2)
org.jetbrains.plugins.github (243.21565.204-ultimate)
com.dsoftware.ghtoolbar (2024.3.1)
net.seesharpsoft.intellij.plugins.csv (4.0.0)
Gitflow-Fix (0.7.13)
app.teamhub (18.0.7)
uk.co.ben-gibson.remote.repository.mapper (4.5.2)
com.microsoft.vso.idea (1.162.2)
mobi.hsz.idea.gitignore (4.5.4)
Dart (243.23177)
org.mapstruct.intellij (1.8.0)
com.nasller.CodeGlancePro (1.9.4)
org.jetbrains.android (243.21565.214)
io.flutter (83.0.4)
com.android.tools.design (243.21565.214)
dev.turingcomplete.intellijdevelopertoolsplugins (6.0.1)
com.jetbrains.packagesearch.intellij-plugin (243.0.14)
ru.adelf.idea.dotenv (2024.3)
com.clutcher.comments_highlighter (2024.2.14)
dev.ngocta.pycharm-odoo (2024.9.6.243)
com.mallowigi.colorHighlighter (18.1.0)
com.eny.i18n (2.6.2)
de.marhali.easyi18n (4.7.0)
org.sonarlint.idea (10.12.0.79769)
com.mallowigi (97.0.0)
cn.yiiguxing.plugin.translate (3.6.7)
com.github.copilot (1.5.29.7524)
izhangzhihao.rainbow.brackets (2024.2.7-241)
zielu.gittoolbox (600.0.9+243)
com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer (0.17.0)
com.intellij.plugins.html.instantEditing (243.21565.129)
Kotlin: 243.21565.193-IJ
Current Desktop: Undefined

Any idea what could be wrong and how can we help to fix it ?

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

No branches or pull requests

3 participants