Skip to content
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

Fix i18n extract #233

Merged
merged 2 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<button
class="
items-center
justify-center
px-2
py-1
bg-primary
text-white
rounded
opacity-25
capitalize
"
class="items-center justify-center px-2 py-1 bg-primary text-white rounded opacity-25 capitalize"
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why we have such changes...
Prettier or npm run format should guarantee to always have the correct indentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prettier has changed its strategy for html formatting with version 2.5 (https://prettier.io/blog/2021/11/25/2.5.0.html#collapse-html-class-attributes-onto-one-line-11827httpsgithubcomprettierprettierpull11827-by-jlongsterhttpsgithubcomjlongster), and does not wrap lines > printWidth anymore. I didn't see another param to conserve the old behavior, which might not make sense anyway, since this evolution.

Copy link
Member

Choose a reason for hiding this comment

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

Yes but i wonder why all those changes were not automatic and mandatory for the CI when angular and prettier were updated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's because prettier is only run on affected libraries and apps, so the new formatting strategy has not been applied everywhere but will be gradually. I guess it would be preferable to have all HTML reformatted correctly to avoid confusing diffs in the future.

Copy link
Member

Choose a reason for hiding this comment

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

yes, at some point we should run test, lint and format on all sources to avoid having broken stuff while didn't change anything about them.
We should add npm scripts for that IMO.

(click)="onClick()"
>
<mat-icon *ngIf="icon" class="align-middle">{{ icon }}</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
<div
class="
relative
w-full
h-full
bg-white
border border-gray-500
rounded-lg
overflow-hidden
"
class="relative w-full h-full bg-white border border-gray-500 rounded-lg overflow-hidden"
>
<gn-ui-map-context
[context]="mapContext$ | async"
[mapConfig]="mapConfig"
></gn-ui-map-context>
<div
class="
feature-info
p-3
bg-white
absolute
overflow-y-auto overflow-x-hidden
max-h-72
w-56
"
class="feature-info p-3 bg-white absolute overflow-y-auto overflow-x-hidden max-h-72 w-56"
[class.hidden]="!selection"
>
<button
Expand Down
39 changes: 3 additions & 36 deletions libs/ui/elements/src/lib/api-card/api-card.component.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,16 @@
<div
class="
flex flex-col
justify-between
h-40
w-72
pt-5
pb-6
px-7
rounded
bg-gray-100
border-4 border-transparent
hover:border-gray-100 hover:bg-white
filter
overflow-hidden
"
class="flex flex-col justify-between h-40 w-72 pt-5 pb-6 px-7 rounded bg-gray-100 border-4 border-transparent hover:border-gray-100 hover:bg-white filter overflow-hidden"
>
<div
class="
font-title font-medium
text-21
overflow-ellipsis overflow-hidden
break-words
pb-5
"
class="font-title font-medium text-21 overflow-ellipsis overflow-hidden break-words pb-5"
style="height: 4.5rem"
>
{{ link.name || link.description }}
</div>
<div class="">
<div class="flex flex-row justify-between">
<span
class="
badge
inline-flex
items-center
justify-center
px-2
py-1
text-13
font-medium
leading-none
text-white
rounded
capitalize
"
class="badge inline-flex items-center justify-center px-2 py-1 text-13 font-medium leading-none text-white rounded capitalize"
>{{ link.protocol }}</span
>
<button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<div
class="
root
flex
justify-between
shadow-primary-light
hover:shadow-primary
px-6
py-5
"
class="root flex justify-between shadow-primary-light hover:shadow-primary px-6 py-5"
>
<div class="flex-grow-1">
<div
Expand All @@ -18,35 +10,15 @@
</div>
<div class="pt-1">
<span
class="
badge
inline-flex
items-center
justify-center
px-2
py-1
text-13
font-medium
leading-none
text-white
rounded
capitalize
"
class="badge inline-flex items-center justify-center px-2 py-1 text-13 font-medium leading-none text-white rounded capitalize"
>{{ link.format }}</span
>
</div>
</div>
<div class="flex-shrink-0 w-12 flex flex-col justify-center">
<a href="{{ link.url }}" target="_blank">
<mat-icon
class="
align-middle
download-icon
text-3xl
material-icons-outlined
text-gray-200
mr-4
"
class="align-middle download-icon text-3xl material-icons-outlined text-gray-200 mr-4"
>cloud_download</mat-icon
>
</a>
Expand Down
17 changes: 1 addition & 16 deletions libs/ui/elements/src/lib/link-card/link-card.component.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
<div
class="
flex flex-col
justify-between
root
h-40
w-80
py-5
px-5
bg-white
rounded
border-gray-300
filter
shadow-primary-light
hover:shadow-primary
overflow-hidden
"
class="flex flex-col justify-between root h-40 w-80 py-5 px-5 bg-white rounded border-gray-300 filter shadow-primary-light hover:shadow-primary overflow-hidden"
>
<div class="max-h-24 overflow-hidden overflow-ellipsis">
<p class="font-title font-medium text-21 break-words pb-1">
Expand Down
11 changes: 1 addition & 10 deletions libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
<input
#searchInput
type="text"
class="
appearance-none
focus:outline-white
leading-tight
rounded
w-full
text-main
shadow-primary-light
focus:shadow-primary
"
class="appearance-none focus:outline-white leading-tight rounded w-full text-main shadow-primary-light focus:shadow-primary"
[placeholder]="placeholder"
[formControl]="control"
[matAutocomplete]="auto"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<button
class="
items-center
justify-center
p-1
bg-primary-opacity-25
text-white
rounded
"
class="items-center justify-center p-1 bg-primary-opacity-25 text-white rounded"
>
<mat-icon class="align-middle">{{ icon }}</mat-icon>
<span class="tooltip align-middle mx-2 hidden">{{ label }}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<div class="h-full w-full relative flex-shrink-0 overflow-hidden">
<svg
class="
text-gray-200
absolute
h-12
w-12
transform
-translate-x-1/2 -translate-y-1/2
"
class="text-gray-200 absolute h-12 w-12 transform -translate-x-1/2 -translate-y-1/2"
style="top: 50%; left: 50%"
xmlns="http://www.w3.org/2000/svg"
fill="none"
Expand Down
12 changes: 2 additions & 10 deletions libs/ui/widgets/src/lib/popup-alert/popup-alert.component.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
<div class="h-full relative container">
<div
class="
pointer-events-auto
absolute
text-white
flex flex-row
p-2
rounded
message
"
class="pointer-events-auto absolute text-white flex flex-row p-2 rounded message"
role="alert"
[ngClass]="{
'position-bottom': position === 'bottom',
'position-top': position === 'top',
expanded,
expanded: this.expanded,
'bg-red-500': type === 'danger',
'bg-yellow-500': type === 'warning',
'bg-blue-500': type === 'info'
Expand Down
Loading