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

create AddCondition button #92

Merged
merged 4 commits into from Dec 4, 2020
Merged

create AddCondition button #92

merged 4 commits into from Dec 4, 2020

Conversation

guergana
Copy link
Contributor

@guergana guergana commented Dec 3, 2020

first commit:

  • added text for wikitranslate
  • added english translation

second commit:

  • created AddCondition button
  • added test to verify proper implementation of emitter

third commit:

  • Use AddCondition in QueryBuilder component

- added text for wikitranslate
- added english translation
Ladsgroup
Ladsgroup previously approved these changes Dec 3, 2020
@@ -222,4 +227,9 @@ a {
.querybuilder__run {
margin-block-start: $dimension-layout-medium;
}

.querybuilder__add-condition {
float: inline-end;
Copy link
Contributor Author

@guergana guergana Dec 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to use flex here instead? in that case we need a flex wrapper only for this element

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like it has terrible browser support.
https://caniuse.com/?search=inline-end

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think our postcss is supposed to take care of that, but somehow this is not working. I.e. it is broken in chrome.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On inspecting it further, that part of postcss seems to correctly replace it with float: right and float: left, but we are not picking it up because there is still some confusion about the dir attribute. I'll look.

@guergana guergana changed the title translation files for button add-condition create AddCondition button Dec 3, 2020
@Ladsgroup Ladsgroup self-requested a review December 4, 2020 06:27
@guergana guergana force-pushed the add-condition-component branch 2 times, most recently from c5cd2f2 to 757df7f Compare December 4, 2020 10:34
Copy link
Contributor

@bereket-WMDE bereket-WMDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks good to me

Copy link
Collaborator

@micgro42 micgro42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as intended. Postcss produces the following styles:

[dir=ltr] .querybuilder__add-condition[data-v-4ec7d228]{float:right}
[dir=rtl] .querybuilder__add-condition[data-v-4ec7d228]{float:left}
.querybuilder__add-condition[data-v-4ec7d228]{float:inline-end}

That is what we want. The problem is that we are currently always using [dir=auto] and so those styles don't match. However, that problem is independent of this PR and so I'm approving this.

@guergana guergana merged commit 20da8d9 into master Dec 4, 2020
@guergana guergana deleted the add-condition-component branch December 4, 2020 13:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
4 participants