Skip to content

fix: change #aarrggbb to #rrggbbaa #8519

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

Closed
wants to merge 5 commits into from

Conversation

farfromrefug
Copy link
Collaborator

This makes {N} support the web standard ##rrggbbaa format
See #8517

Now are there some tests to update?

@NathanaelA

This comment was marked as abuse.

@vtrifonov
Copy link
Contributor

Yep, a lot of UI tests are failing. You can review them here - https://s3.amazonaws.com/ns-test-reports/index.html?prefix=reports/tns-modules/hex_colors/3942

@farfromrefug
Copy link
Collaborator Author

@vtrifonov thanks will fix them. Nice report interface !!!!

This little improvement should make things a bit faster by not using regexp.
though we dont reject #re0000 for example. I will give a wrong color.
Before it was simply showing no color. Not a big difference for a speed improvement
@farfromrefug
Copy link
Collaborator Author

@vtrifonov i fixed the issues and all the test are passing here.
However i dont understand the travis error :s I mean i dont see where that cant parse css color happens.
Also please review that change 67c9907
I did to prevent a regexp text on every single hex color.

@NathanWalker
Copy link
Contributor

@farfromrefug thanks for this excellent contribution - I've long wanted this as well as much more intuitive - Given it's a breaking change we'll put this on the 7.0 release plan 👍

@NathanWalker
Copy link
Contributor

@farfromrefug let's work together to get these changes into master - you may can close and reopen with target to master as would be nice to get this in {N} 7.0

@NathanWalker NathanWalker added this to the 8.0 milestone Oct 27, 2020
@NathanWalker NathanWalker changed the base branch from master to release/8.0.0 January 21, 2021 17:34
NathanWalker added a commit that referenced this pull request Mar 7, 2021
@NathanWalker
Copy link
Contributor

NathanWalker commented Mar 7, 2021

Closing this since I reimplemented on our 8.0 cleanup branch here:
4408be9
@farfromrefug credit in the commit, thanks again for pushing this through, it will be in 8.0

NathanWalker added a commit that referenced this pull request Mar 7, 2021
original pr credit to @farfromrefug
#8519

BREAKING CHANGE

Long standing inconsistency with color handling here.

BEFORE:

```
// #aarrggbb

const color = new Color('#ff00ff00');

Label {
    background-color: #ff00ff00;
}
```

AFTER:

```
// #rrggbbaa

const color = new Color('#00ff00ff');

Label {
    background-color: #00ff00ff;
}
```
NathanWalker added a commit that referenced this pull request Mar 30, 2021
original pr credit to @farfromrefug
#8519

BREAKING CHANGE

Long standing inconsistency with color handling here.

BEFORE:

```
// #aarrggbb

const color = new Color('#ff00ff00');

Label {
    background-color: #ff00ff00;
}
```

AFTER:

```
// #rrggbbaa

const color = new Color('#00ff00ff');

Label {
    background-color: #00ff00ff;
}
```
NathanWalker added a commit that referenced this pull request Mar 30, 2021
original pr credit to @farfromrefug
#8519

BREAKING CHANGE

Long standing inconsistency with color handling here.

BEFORE:

```
// #aarrggbb

const color = new Color('#ff00ff00');

Label {
    background-color: #ff00ff00;
}
```

AFTER:

```
// #rrggbbaa

const color = new Color('#00ff00ff');

Label {
    background-color: #00ff00ff;
}
```
NathanWalker added a commit that referenced this pull request Apr 2, 2021
original pr credit to @farfromrefug
#8519

BREAKING CHANGE

Long standing inconsistency with color handling here.

BEFORE:

```
// #aarrggbb

const color = new Color('#ff00ff00');

Label {
    background-color: #ff00ff00;
}
```

AFTER:

```
// #rrggbbaa

const color = new Color('#00ff00ff');

Label {
    background-color: #00ff00ff;
}
```
NathanWalker added a commit that referenced this pull request Apr 6, 2021
original pr credit to @farfromrefug
#8519

BREAKING CHANGE

Long standing inconsistency with color handling here.

BEFORE:

```
// #aarrggbb

const color = new Color('#ff00ff00');

Label {
    background-color: #ff00ff00;
}
```

AFTER:

```
// #rrggbbaa

const color = new Color('#00ff00ff');

Label {
    background-color: #00ff00ff;
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants