Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

feat: Ec component site header #33

Merged
merged 22 commits into from
Feb 27, 2019
Merged

feat: Ec component site header #33

merged 22 commits into from
Feb 27, 2019

Conversation

nimek2
Copy link
Contributor

@nimek2 nimek2 commented Feb 22, 2019

No description provided.

@nimek2 nimek2 added the pr: review needed Use this label to show that your PR needs to be review label Feb 22, 2019
@emeryro
Copy link
Contributor

emeryro commented Feb 22, 2019

Before going any further in the PR, I have to ask: why is there a version of EU link here?
It may conflict with the PR dedicated to EU links, and as far as I know, it is not required for EC site header.

@hapertown
Copy link

@emeryro
Look at the Header image src - path is incorrect (no image). Let me know if you want to set the path to the graphic statically (then I ask for the correct URL) or download it from some resource (just like defaultSprite).

Question # 2 - in this component there are elements of EC Link. We could use this component, the problem is only that the EC Link component supports plain text, not all HTML.
Is the current solution enough for you at this stage whether EC Link must support HTML as a label parameter? Then we would have to do it as a block in TWIG.

@hapertown
Copy link

hapertown commented Feb 22, 2019

Before going any further in the PR, I have to ask: why is there a version of EU link here?
It may conflict with the PR dedicated to EU links, and as far as I know, it is not required for EC site header.

This is my mistake - I made a new branch in the wrong way. Everything fixed in 9db993d. I'll just add the correct yarn.lock file.

@hapertown
Copy link

@emeryro Already everything is ok, you can do a review.

@emeryro emeryro added pr: under review and removed pr: review needed Use this label to show that your PR needs to be review labels Feb 22, 2019
@emeryro emeryro self-assigned this Feb 22, 2019
- "search_form" (associative array) (default: predefined structure): EC Search Form component structure
- "language" (associative array) (default: predefined structure): Language switcher settings. Default settings for English. format:
- "url": (string) (default: ''): URL for switcher
- "label": (string) (default: 'English'): Switcher language label, eg. 'English', 'Français', etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not enforce default language (politcal reasons...). So instead of using english as default, fields should be empty (in every files)

aria_label: 'Commmission Européenne',
},
header_image: {
src: 'static/media/logo--fr.a8aaa7ab.svg',
Copy link
Contributor

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

you can find the logos in package @ecl/ec-resources-logo: https://github.com/ec-europa/europa-component-library/tree/v2-dev/src/systems/ec/resources/logo

I have already made changes locally but I need help.

Could you tell me how to correctly configure the webpack.config.js file so that svg files are not compiled to one icon.svg but separately - so that I can implement them in the Site Header.

Now, when I build the EC environment, I have one svg file (icon.svg), the content of which is equal to the last imported svg, eg from such a resource: import headerFrenchLogo from @ecl/ec-resources-logo/logo-fr.svg.

Thank you for your help.

Copy link
Contributor

Choose a reason for hiding this comment

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

it will be fixed in my PR on language list, but you can already apply the changes if you want: https://github.com/ec-europa/ecl-twig/pull/27/files#diff-ed535e5276105399f01342171198a43eR19

Choose a reason for hiding this comment

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

Changed in 7fac7df

@hapertown
Copy link

@emeryro
I fixed all files according to your instructions, see please.
Unfortunately, I have problems with tests - locally tests are ok, buto after commit, tests have problems with breaklines (look at current tests).
This problem occurs practically every time. Updating npm and calling yarn do not help. Can we somehow synchronize my local environment with the test environment?

@emeryro
Copy link
Contributor

emeryro commented Feb 26, 2019

I tried to run tests locally on your branch, and I got the same error as Drone reported (running yarn, yarn dist, yarn jest).
What environement are you developping on? Mac? Linux?
I am using Ubuntu with following versions

  • Node v8.12.0
  • yarn v1.13.0

@hapertown
Copy link

I tried to run tests locally on your branch, and I got the same error as Drone reported (running yarn, yarn dist, yarn jest).
What environement are you developping on? Mac? Linux?
I am using Ubuntu with following versions

  • Node v8.12.0
  • yarn v1.13.0

My versions are:
Ubuntu 16.04
NodeJS 11.10.0
Yarn 1.12.3

degliwe
degliwe previously approved these changes Feb 26, 2019
},
search_form: {
button: {
label: 'Search',
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add icon information here too (for english and translated). Currently the icon isn't displayed on mobile version.

Choose a reason for hiding this comment

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

Fixed in 659a80d

</a>
</div>
</div>
{%- include '../ec-component-search-form/search-form.html.twig' with _search_form -%}
Copy link
Contributor

Choose a reason for hiding this comment

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

missing class ecl-site-header__search here

Choose a reason for hiding this comment

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

Fixed in 659a80d

I had to modify the file search-form.html.twig in EC Search Form in c89d15d because I founded a small bug there. But it does not affect the tests or other files so I think we can approve it here.

@nimek2 nimek2 added pr: review needed Use this label to show that your PR needs to be review and removed pr: modification needed labels Feb 27, 2019
@emeryro emeryro added pr: under review and removed pr: review needed Use this label to show that your PR needs to be review labels Feb 27, 2019
@emeryro emeryro self-assigned this Feb 27, 2019
@emeryro emeryro merged commit b06b04d into master Feb 27, 2019
@emeryro emeryro deleted the ec-component-site-header branch February 27, 2019 07:52
@yhuard yhuard removed pr: review needed Use this label to show that your PR needs to be review labels Feb 27, 2019
@yhuard yhuard removed pr: under review pr: modification needed pr: review needed Use this label to show that your PR needs to be review labels Feb 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants