-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
@emeryro |
The message in Drone says |
As you have seen many times, I updated the |
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.
Visually the component is fine.
Just a few minor things to be updated
import searchFormDocs from './docs/search-form.md'; | ||
import searchForm from './search-form.html.twig'; | ||
|
||
storiesOf('Components/SearchForm', module) |
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.
that's a small thing, but display in storybook will be better if you add a space between Search and Form here (that's how the item is displayed in the menu)
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.
Fixed in 72483ba
### Example: | ||
|
||
```twig | ||
{% include 'path/to/icon.html.twig' with { |
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.
by adding two spaces at the end of the line, you should be able to force a new line. It would make the code more readable (currently it is a single very long line)
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 would like to understand better what you mean - I understand that there is a lack of breaking the line, but what is the exact line(s) in this case?
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 also dont get it for me it loo
ks ok https://github.com/ec-europa/ecl-twig/blob/ec-component-search-form/src/ec/packages/ec-component-search-form/docs/search-form.md
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.
by adding two spaces at the end of the line, you should be able to force a new line. It would make the code more readable (currently it is a single very long line)
Ok I understand - you mean displaying in the Storybook (Notes section). Fixed in 0d2dc7f
|
||
### Parameters | ||
|
||
- "textInput" (associative array) default: A predefined structure for EC Text Input |
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.
as we are using underscores (snake case) for all other twig variable names, we should use it there too.
(note that it only for twig variables, javascript variables are still in camel case)
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.
Fixed in 72483ba. Please check it.
"access": "public" | ||
}, | ||
"devDependencies": { | ||
"@ecl/ec-specs-search-form": "~2.1.0" |
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.
please add a devDependency to vanilla EC component too
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.
Added in 72483ba
"description": "ECL Twig - EC Search Form", | ||
"publishConfig": { | ||
"access": "public" | ||
}, |
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.
as ec-component-text-input
and ec-component-button
are used directly in the template, they should be added to dependencies
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.
Added in 72483ba
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.
sorry, I meant a dependency to the twig component @ecl-twig/ec-component-text-input
and @ecl-twig/ec-component-button
As they are included in the twig template, if they are not present it will crash. So the dependency is to prevent that.
Also these two should probably be in dependencies
instead of devDependencies
{% include '../ec-component-text-input/text-input.html.twig' with textInput %} | ||
{% endif %} | ||
|
||
{% if textInput is defined %} |
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.
should be button
instead of textInput
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.
Yes my mistake. Fixed in 72483ba
textInput: { | ||
id: 'input-search', | ||
name: 'search', | ||
extra_classes: 'ecl-search-form__text-input', |
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.
there should be a (hidden) label for the text input. Even if it is not displayed to the users, it offers better accessibility (for screen reader for instance)
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.
Please check if I added it well in 72483ba
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.
You should add a label
key in your text_input
object:
text_input: {
...
label: 'Search',
...
}
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.
Almost there, please check the comments
textInput: { | ||
id: 'input-search', | ||
name: 'search', | ||
extra_classes: 'ecl-search-form__text-input', |
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.
You should add a label
key in your text_input
object:
text_input: {
...
label: 'Search',
...
}
"description": "ECL Twig - EC Search Form", | ||
"publishConfig": { | ||
"access": "public" | ||
}, |
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.
sorry, I meant a dependency to the twig component @ecl-twig/ec-component-text-input
and @ecl-twig/ec-component-button
As they are included in the twig template, if they are not present it will crash. So the dependency is to prevent that.
Also these two should probably be in dependencies
instead of devDependencies
When I try to add the dependencies given by you, I get an error: The |
the package name is good, but not the version.
So that's perfectly normal if it doesn't find version 2.1.0 of this component |
Ok, check if now will be ok 4edf092 |
No description provided.