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

feat(file): add download link per translation - INNO-1581 #105

Merged
merged 3 commits into from
Jun 28, 2019

Conversation

yhuard
Copy link
Contributor

@yhuard yhuard commented Jun 28, 2019

New download property added to translation.items. This new property lets you define a custom label and href for each translation.

For convenience, there's also a new icon_path property which defaults to icon.path in order to avoid breaking changes. This new property is used for the icons that can not be changed (e.g. the download icons, the arrow icon)

@yhuard yhuard added pr: wip Mark the PR as WIP pr: review needed Use this label to show that your PR needs to be review and removed pr: wip Mark the PR as WIP labels Jun 28, 2019
@yhuard yhuard marked this pull request as ready for review June 28, 2019 10:39
@emeryro emeryro self-assigned this Jun 28, 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 Jun 28, 2019
@@ -9,6 +9,7 @@ npm install --save @ecl-twig/ec-component-file
## Parameters

- "icon" (object) (default: {}): object of type Icon; file type
- "icon_path" (string) (default: ''): path to the icon file
Copy link
Contributor

Choose a reason for hiding this comment

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

We have an issue here.
Icon path is already part of the icon component. So having it in two different places is confusing.
In some components we have this kind of extra parameters, but in most of them it is part of the Icon structure.
This has to be harmonized.

I'm not in favor of adding duplicate parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mostly agree. To me, icon_path should be some kind of environment variable, set once and for all. It should not be repeated every time we want to use an icon.

Now, if we don't want to introduce the new variable here, we still have to extract the path from somewhere... Let me refactor it a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be better now

@emeryro emeryro removed their assignment Jun 28, 2019
@yhuard yhuard added the pr: review needed Use this label to show that your PR needs to be review label Jun 28, 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 Jun 28, 2019
@emeryro emeryro self-assigned this Jun 28, 2019
@emeryro emeryro removed their assignment Jun 28, 2019
@emeryro emeryro merged commit c2218a7 into v2.7-dev Jun 28, 2019
@emeryro emeryro deleted the feat/file-translations-href-INNO-1581 branch June 28, 2019 13:38
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.

2 participants