Skip to content

Commit

Permalink
fixed a overflowing image bug that was caused by a not supported tag …
Browse files Browse the repository at this point in the history
…in firefox 88 and fixed not truncated text
  • Loading branch information
Felix Ruf committed Aug 5, 2024
1 parent 63adb29 commit 65827ba
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
3 changes: 3 additions & 0 deletions src/Resources/src/components/misc/VeggiIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
<img
v-if="diet === Diet.VEGETARIAN"
class="object-cover"
:class="maxHeight"
src="../../../images/vegetarian.png"
alt="vegetarian"
data-cy="vegetarian-icon"
/>
<img
v-else-if="diet === Diet.VEGAN"
class="object-cover"
:class="maxHeight"
src="../../../images/vegan.png"
alt="vegan"
data-cy="vegan-icon"
Expand All @@ -33,6 +35,7 @@ withDefaults(
defineProps<{
diet: Diet;
tooltipActive?: boolean;
maxHeight?: string;

Check warning on line 38 in src/Resources/src/components/misc/VeggiIcon.vue

View workflow job for this annotation

GitHub Actions / FE Asset Linting

Prop 'maxHeight' requires default value to be set
}>(),
{
tooltipActive: true
Expand Down
14 changes: 8 additions & 6 deletions src/Resources/src/components/participations/Meal.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<table
v-if="meal && meal.title.en !== 'Combined Dish'"
class="grow-1 table-fixed border-collapse rounded-b-lg rounded-t-[18px] border-0 border-none bg-white"
class="w-full table-fixed border-collapse rounded-b-lg rounded-t-[18px] border-0 border-none bg-white"
>
<thead
class="shadow-[0_15px_35px_0_#5B788F21]"
class="shadow-[0_15px_35px_0_#5B788F21] w-full"

Check warning on line 7 in src/Resources/src/components/participations/Meal.vue

View workflow job for this annotation

GitHub Actions / FE Asset Linting

Invalid Tailwind CSS classnames order
:class="[meal.variations.length > 0 ? '' : 'rounded-b-lg']"
>
<tr class="w-full">
<th
:colspan="meal.variations.length > 0 ? meal.variations.length : 1"
class="flex flex-row justify-center gap-2 p-4 align-top text-lg text-primary"
class="grid w-full grid-flow-col justify-center gap-2 p-4 align-top break-all text-lg text-primary"

Check warning on line 13 in src/Resources/src/components/participations/Meal.vue

View workflow job for this annotation

GitHub Actions / FE Asset Linting

Invalid Tailwind CSS classnames order
>
{{ languageIsEnglish ? meal.title.en : meal.title.de }}
<VeggiIcon
Expand All @@ -19,6 +19,7 @@
class="self-center"
:class="meal.diet === Diet.VEGAN ? 'h-[45px]' : 'h-[42px]'"
:tooltip-active="false"
:maxHeight="meal.diet === Diet.VEGAN ? 'max-h-[45px]' : 'max-h-[42px]'"
/>
</th>
</tr>
Expand All @@ -29,19 +30,20 @@
:key="index"
>
<td
class="flex min-h-[60px] flex-row content-center justify-center gap-2"
class="grid min-h-[60px] grid-flow-col content-center justify-center gap-2 p-2"
:class="//@ts-ignore
[meal.variations.length - 1 > index ? 'border-b border-solid' : 'border-none']"
>
<span class="my-auto">
<span class="my-auto break-all">
{{ getTitleForLocale(variation) }}
</span>
<VeggiIcon
v-if="variation.diet && variation.diet !== Diet.MEAT"
:diet="variation.diet"
class="self-center"
:class="variation.diet === Diet.VEGAN ? 'h-[42px]' : 'h-[35px]'"
:class="variation.diet === Diet.VEGAN ? 'h-[31px]' : 'h-[36px]'"
:tooltip-active="false"
:maxHeight="meal.diet === Diet.VEGAN ? 'max-h-[31px] h-[31px]' : 'max-h-[36px] h-[36px]'"
/>
</td>
</tr>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/src/components/participations/MealsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
<div
id="mealsList"
ref="mealsList"
class="my-6 flex h-fit flex-row gap-4 p-0"
class="my-6 grid h-fit grid-flow-col auto-cols-[1fr] gap-4 p-0"

Check warning on line 5 in src/Resources/src/components/participations/MealsList.vue

View workflow job for this annotation

GitHub Actions / FE Asset Linting

Invalid Tailwind CSS classnames order
>
<Meal
v-for="meal in mealsWithVariations"
:key="meal.mealId"
class="flex-1"
:meal="meal"
/>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/Resources/src/components/participations/MealsSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
>
<td
v-if="index < 3"
class="flex flex-row content-center justify-center gap-2 truncate"
class="grid grid-flow-col content-center justify-center gap-2 px-2"
:class="[mealNameIsEmpty(String((meal as IDish).title)) ? 'h-[60px]' : 'h-[60px] border-b border-solid']"
>
<span class="my-auto">
<span class="my-auto truncate">
{{ String((meal as IDish).title) }}
</span>
<VeggiIcon
v-if="(meal as IDish).diet && (meal as IDish).diet !== Diet.MEAT"
:diet="(meal as IDish).diet"
class="self-center"
:class="(meal as IDish).diet === Diet.VEGAN ? 'h-[42px]' : 'h-[35px]'"
:class="(meal as IDish).diet === Diet.VEGAN ? 'h-[31px]' : 'h-[36px]'"
:tooltip-active="false"
:maxHeight="meal.diet === Diet.VEGAN ? 'max-h-[31px] h-[31px]' : 'max-h-[36px] h-[36px]'"
/>
</td>
</tr>
Expand Down

0 comments on commit 65827ba

Please sign in to comment.