Skip to content

Commit

Permalink
Merge pull request #497 from AOEpeople/bugfix/bugfix/#265096-tv-overflow
Browse files Browse the repository at this point in the history
Bugfix/bugfix/#265096 tv overflow
  • Loading branch information
MalibusParty authored Aug 5, 2024
2 parents 63adb29 + 0e5ec9b commit 83bef40
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ jobs:
- name: Test with docker compose
run: |
mkdir build
docker-compose -f docker-compose-test.yaml up --abort-on-container-exit
docker-compose -f docker-compose-test.yaml down --remove-orphans
docker compose -f docker-compose-test.yaml up --abort-on-container-exit
docker compose -f docker-compose-test.yaml down --remove-orphans
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
if: always()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@
class="relative cursor-pointer px-4 py-1 text-left text-[14px] font-medium text-[#9CA3AF] hover:bg-[#FAFAFA]"
@click="selectProfile(profile as IProfile)"
>
<span class="size-full truncate">
<span
data-cy="add-part-li"
class="size-full truncate"
>
{{ getDisplayName(profile as IProfile) }}
</span>
</LazyListItem>
Expand Down
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="w-full shadow-[0_15px_35px_0_#5B788F21]"
: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 break-all p-4 align-top text-lg text-primary"
>
{{ 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 auto-cols-[1fr] grid-flow-col gap-4 p-0"
>
<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
2 changes: 1 addition & 1 deletion tests/e2e/cypress/e2e/MenuParticipations.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Test Menu Participations View', () => {
// Test Add Search Bar
cy.get('input').first().click().type('meals');
cy.wait(500);
cy.get('li').each(($el) => {
cy.get('span[data-cy="add-part-li"]').each(($el) => {
expect($el.text()).to.match(/Meals, */);
});
cy.get('input').clear().first().type('bob');
Expand Down

0 comments on commit 83bef40

Please sign in to comment.