-
Notifications
You must be signed in to change notification settings - Fork 464
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
Selector functions #1064
Selector functions #1064
Conversation
Hey @onedayitwillmake great work so far 👍 I guess it is already passing quite a few todo tests? I also expect a few other extend bugs to be solved by this work, since it should fix/improve the Will definitely give it a thorough review after we released 3.2 🎆 |
Gave it a whirl and these tests pass now on my side 😃
|
@mgreter Would be great if you could generate it! @mgreter @xzyfer Re: $selector-append To give an example:
Whoops, swapping the iteration order of the loop fixes the issue. |
Changes Unknown when pulling 0c606ea on onedayitwillmake:selector_functions into * on sass:master*. |
@onedayitwillmake if you apply this change you should be good |
Changes Unknown when pulling 1e71a09 on onedayitwillmake:selector_functions into * on sass:master*. |
@onedayitwillmake yes please rebase on master and resolve any conflicts. It also looks like this branch has had a lot of merges with master which means it cannot be merged in it's current state. A rebase may help push out the unwanted commits, otherwise we'll need to find another way to clean up this branch. We rely heavily on git forensics to track down bug and regressions. This requires a clean commit history. |
@xzyfer Gotcha, makes sense. |
I can see commits from myself and @mgreter which don't belong here. These were presumably introduced in a merge. |
@onedayitwillmake have you had a chance to clean up this PR? You can probably squash this down to a few commits. |
@xzyfer I will give it another go tomorrow morning, you reckon I should just squash it to a few key commits and rebase from there? |
@onedayitwillmake yes I do. However I expect you will into issues due to the merge commits. |
1e71a09
to
fedea6b
Compare
# The first commit's message is: Moved naiveTrim to Node # The 2nd commit message will be skipped: # Fixed some non-wrapped DEBUG statements causing compile errors
@xzyfer Looks like something else broke on this one, saying I have a duplicate function however I'm not seeing that on my end. Maybe I'm just bad at pull-request, what do you suggest |
|
||
|
||
// For every selector in RHS, see if we have /any/ selectors which are a super-selector of it | ||
bool Selector_List::is_superselector_of(Sass::Selector_List *rhs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is cause of the CI error. See line 501 above.
Impressive git work to fix this branch. Please remove the debug code. |
fedea6b
to
74600d3
Compare
@xzyfer Thanks for heads up, I removed them |
@mgreter Any movement on this one? |
|
||
for (size_t i = 0, L = extender->length(); i < L; ++i) { | ||
// let's test this out | ||
cerr << "REGISTERING EXTENSION REQUEST: " << (*extender)[i]->perform(&to_string) << " <- " << compound_sel->perform(&to_string) << endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug code?
@onedayitwillmake I've left some nitpick feedback for now. This will be a closer look when we're ready to start working on 3.3. Thanks heaps for all your work here, it's really appreciated. One suggestion I have is to try to make the diff as clean as possible so we can focus on the changes that are relevant i.e. avoid unnecessary white changes, remove debug or commented out code |
Superseded #1261 |
Please note: The code in this pull request was written by myself, and is does not represent my employer.
updated 4/08/15
updated 4/09/15
I rebased the PR #1019 and removed Xcode references.
I have 8 of the 8 built, I started from the bottom for some reason.
Bold means they are in and passing the test.
I'm still actively working on this - however being my second PR and new to the library I wanted to make sure anyone could catch any silly things I was doing.
Some notes:
ARGSELL
to complimentARG
,ARGR
,ARGM
since all the selector functions rely on that so heavilySelector_List::selector_unify
andSelector_List::selector_unify
to workpublic static
methods version of Extend's subweave, for now I named it StaticSubweave just to make sure I don't step on any toes, will remove floating one if that seems fine to everyoneComplex_Selector::unify_with
was returning correct results but the final shared selector would sometimes appear twice, and blindly adding everything else in the collection (I could not get node's existingtrim
implementation to work - I Also could not find any references to it be used.public static
version of Extend's extendSelectorListisReplace
toExtend::extendSelectorList
- which does not add the Selector if an extension takes place.Vectorized<T>::first
to complimentVectorized<T>::back
in order to makeselector_append
code more clear,