Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Support for color definition format beginning with "0x" #7723

Closed
arieljake opened this issue May 1, 2014 · 25 comments
Closed

Support for color definition format beginning with "0x" #7723

arieljake opened this issue May 1, 2014 · 25 comments

Comments

@arieljake
Copy link

In the ColorUtils file, I don't see a regex to match colors like this:

0xFFFFFF

Can we add this?

@peterflynn
Copy link
Member

It's not used on the web much, but it seems fair (and harmless) to add it. @arieljake Would you like to write up a PR?

@arieljake
Copy link
Author

I'm encountering it when writing three.js code.

Yes I will write a PR.

@JeffryBooher
Copy link
Contributor

Marking this no pri/starter bug since it's being worked on by an external contributor.

piotrbrzuska added a commit to piotrbrzuska/brackets that referenced this issue Aug 18, 2014
@piotrbrzuska
Copy link

I add this format do Regex, fix it to preview in QuickView and InlineColorEditor. I don't know to add output in this format for InlineColorEditor.

@arieljake
Copy link
Author

thats where i got stuck too

@piotrbrzuska
Copy link

I think it should go to extension, not the application main content

@redmunds
Copy link
Contributor

@piotrbrzuska @arieljake The QuickView and InlineColorEditor features both use the ColorUtils.COLOR_REGEX RegExp: https://github.com/adobe/brackets/blob/master/src/utils/ColorUtils.js#L40

@piotrbrzuska
Copy link

@redmunds yes, we know it. Check my commit. But RegExp is only a part of this issue.

@redmunds
Copy link
Contributor

@piotrbrzuska Sorry, I missed your commit. Look in the HTML Template for the InlineColorEditor (InlineColorEditor/ColorEditorTemplate.html) and you'll see:

<li title="{{COLOR_EDITOR_HEX_BUTTON_TIP}}"><a href="#" tabindex="0" class="hex">Hex</a></li>

This is the element that shows up in the InlineColorEditor for the HTML/CSS "Hex" format. Add a similar element for "0x" format. You should be able to find the code for class="hex" and add a similar code branch for the new format.

@nethip nethip self-assigned this Dec 3, 2014
@PlanetVaster
Copy link
Contributor

@redmunds Where is the ColorEditorTemplete.html located?

@redmunds
Copy link
Contributor

redmunds commented Mar 9, 2015

ColorEditor template is in:

src/extensions/default/InlineColorEditor/ColorEditorTemplate.html

@PlanetVaster
Copy link
Contributor

@redmunds Like this <li title="{{COLOR_EDITOR_HEX_BUTTON_TIP}}"><a href="#" tabindex="0" class="0x">0x</a></li> sorry if that is wrong I don't understand what your saying

@redmunds
Copy link
Contributor

@PlanetVaster That's basically it, but it needs a unique title which is the tooltip.

@PlanetVaster
Copy link
Contributor

So like <li title="{{COLOR_EDITOR_0X_BUTTON_TIP}}"><a href="#" tabindex="0" class="0x">0x</a></li>

@redmunds
Copy link
Contributor

Yes, Then COLOR_EDITOR_0X_BUTTON_TIP string needs to be defined in src/nls/root/strings.js

@sQuarecoW
Copy link

What is the status of this?

@KrithikaNarayanan
Copy link

Guess i arrived here late... is this issue still open for claiming?

@petetnt
Copy link
Collaborator

petetnt commented Jan 18, 2017

@KrithikaNarayanan I think this hasn't been fixed / added yet. Feel free to work on it if you'd like to!

See the article How to hack on Brackets to get started with the Brackets codebase. If you have any questions, feel free to post them here! We also have a Slack channel for day-to-day communication. (You can join by sending a mail to admin@brackets.io with the subject line slack registration request specifying the email addresses you would like to register).

@nyteksf
Copy link
Contributor

nyteksf commented Mar 4, 2017

Hello again. I found myself interested in taking a crack at this issue if that could be approved. :)

@zaggino

@zaggino
Copy link
Contributor

zaggino commented Mar 4, 2017

Hi @nyteksf , you don't need anyone's approval to start working on an issue that's not being worked on. Just open a PR (unfinished is absolutely fine) that you're working on this and mention the link here. That will let others will know that the issue is being worked on.

@nyteksf
Copy link
Contributor

nyteksf commented Mar 12, 2017

Hello again. I believe I'm finished with this one. Please do feel free to let me know if any changes need to be made, and I'll be happy to get right on that for you. Thank you.

edit: I have also notified those at tinycolor to the lack of and desire for compatibility with 0x formatted colors.

@zaggino @ficristo

@ficristo
Copy link
Collaborator

@nyteksf thank you for filing the issue.
As a side note: in future, in your PRs, could you add the issue number also in the comment?
In this way GitHub cans generate an automatic link to your PRs in the issue itself.

@nyteksf
Copy link
Contributor

nyteksf commented Mar 13, 2017

@ficristo Noob question here, I suppose; being that this is my second PR ever. Could you please elaborate for me just a little about what was meant so I can do that for you all the next time? I already try to always add the issue number to the title and every commit message. Do you mean to also add it to the literal comments I am making much like this one? My bad. Thanks for your help.

@ficristo
Copy link
Collaborator

Don't worry about asking, you are welcome.
Yes, I meant exactly comments like this. Right now, for example, I don't know if you have already opened a PR, I can only see commits that were done in you fork.
So if I add the PR number like this #13154 now GitHub will show a link in the PR to this issue.
Adding the issue number in the title is fine, but will not generate a link.

@nyteksf
Copy link
Contributor

nyteksf commented Mar 13, 2017

#13154 - @ficristo Aha. I see now. And thank you very much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests