Skip to content

Commit 098838c

Browse files
Brett-S-OWBLKuemmel
authored andcommitted
Remove full table height formatting (#2492)
1 parent 5e5c51b commit 098838c

5 files changed

Lines changed: 11 additions & 56 deletions

File tree

packages/modules/web_themes/koala/source/src/components/BaseCarousel.vue

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
padding
1010
:navigation="groupedItems.length > 1"
1111
:arrows="groupedItems.length > 1 && $q.screen.gt.xs"
12-
:class="[
13-
'q-mt-md',
14-
isMobile ? 'carousel-height-mobile' : 'carousel-height-desktop',
15-
]"
12+
class="carousel-height q-mt-md"
1613
transition-next="slide-left"
1714
transition-prev="slide-right"
1815
@mousedown.prevent
@@ -37,9 +34,7 @@
3734

3835
<script setup lang="ts">
3936
import { ref, computed, watch, nextTick, onMounted } from 'vue';
40-
import { useQuasar, Platform } from 'quasar';
41-
42-
const isMobile = computed(() => Platform.is.mobile);
37+
import { useQuasar } from 'quasar';
4338
4439
const props = defineProps<{
4540
items: number[];
@@ -150,13 +145,8 @@ watch(
150145
padding: 0.25em;
151146
}
152147
153-
.carousel-height-mobile {
148+
.carousel-height {
154149
min-height: fit-content;
155150
height: 100%;
156151
}
157-
158-
.carousel-height-desktop {
159-
min-height: fit-content;
160-
height: auto;
161-
}
162152
</style>

packages/modules/web_themes/koala/source/src/components/BaseTable.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
2-
<div class="q-pa-md full-height">
2+
<div class="q-pa-md">
33
<q-table
4-
class="sticky-header-table full-height"
4+
class="sticky-header-table"
55
:rows="mappedRows"
66
:columns="mappedColumns"
77
row-key="id"
@@ -143,6 +143,7 @@ const props = defineProps<{
143143
columnConfig: ColumnConfiguration[];
144144
rowKey?: string;
145145
searchInputVisible?: boolean;
146+
tableHeight?: string;
146147
filter?: string;
147148
columnsToSearch?: string[];
148149
rowExpandable?: boolean;

packages/modules/web_themes/koala/source/src/components/ChargePointInformation.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
:row-data="tableRowData"
1515
:column-config="isMobile ? tableColumnsMobile : columnConfigDesktop"
1616
:search-input-visible="searchInputVisible"
17+
:table-height="isMobile ? '35vh' : '40vh'"
1718
v-model:filter="filter"
1819
:columns-to-search="['vehicle', 'name']"
1920
:row-expandable="isMobile"

packages/modules/web_themes/koala/source/src/components/VehicleInformation.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
:row-data="tableRowData"
1515
:column-config="isMobile ? columnConfigMobile : columnConfigDesktop"
1616
:search-input-visible="searchInputVisible"
17+
:table-height="isMobile ? '35vh' : '40vh'"
1718
v-model:filter="filter"
1819
:columns-to-search="['name', 'manufacturer', 'model']"
1920
:row-expandable="true"

packages/modules/web_themes/koala/source/src/pages/IndexPage.vue

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,11 @@
2424
<!-- Tab Panels -->
2525
<q-tab-panels v-model="tab" class="col">
2626
<!-- Charge Points -->
27-
<q-tab-panel
28-
name="charge-points"
29-
class="q-pa-none column"
30-
:class="[
31-
'q-pa-none column',
32-
isChargePointTableView ? '' : 'remove-flex-properties',
33-
]"
34-
>
27+
<q-tab-panel name="charge-points" class="q-pa-none column">
3528
<ChargePointInformation />
3629
</q-tab-panel>
3730
<!-- Vehicles -->
38-
<q-tab-panel
39-
name="vehicles"
40-
:class="[
41-
'q-pa-none column',
42-
isVehicleTableView ? '' : 'remove-flex-properties',
43-
]"
44-
>
31+
<q-tab-panel name="vehicles" class="q-pa-none column">
4532
<VehicleInformation />
4633
</q-tab-panel>
4734
<!-- Batteries -->
@@ -58,8 +45,7 @@
5845
</template>
5946

6047
<script setup lang="ts">
61-
import { computed, ref } from 'vue';
62-
import { useMqttStore } from 'src/stores/mqtt-store';
48+
import { ref } from 'vue';
6349
import ChartCarousel from 'src/components/ChartCarousel.vue';
6450
import ChargePointInformation from 'src/components/ChargePointInformation.vue';
6551
import BatteryInformation from 'src/components/BatteryInformation.vue';
@@ -69,36 +55,12 @@ import VehicleInformation from 'src/components/VehicleInformation.vue';
6955
defineOptions({
7056
name: 'IndexPage',
7157
});
72-
const mqttStore = useMqttStore();
7358
7459
const tab = ref<string>('charge-points');
75-
76-
const isChargePointTableView = computed(() => {
77-
const cardViewBreakpoint =
78-
mqttStore.themeConfiguration?.chargePoint_card_view_breakpoint || 4;
79-
return mqttStore.chargePointIds.length > cardViewBreakpoint;
80-
});
81-
82-
const isVehicleTableView = computed(() => {
83-
const cardViewBreakpoint =
84-
mqttStore.themeConfiguration?.vehicle_card_view_breakpoint || 4;
85-
return mqttStore.vehicleList.length > cardViewBreakpoint;
86-
});
8760
</script>
8861

8962
<style scoped>
9063
.chart-section {
9164
height: 40vh;
9265
}
93-
.tab-section {
94-
flex: 1 1 0; /* allow the tab section to grow and shrink - flex-grow - flex-shrink - flex-basis */
95-
min-height: 0; /* important for flexbox overflow */
96-
display: flex;
97-
flex-direction: column;
98-
}
99-
/* "remove-flex-properties" prevents cards from stretching total vertical space in card view */
100-
.remove-flex-properties {
101-
flex: none !important;
102-
height: auto !important;
103-
}
10466
</style>

0 commit comments

Comments
 (0)