Skip to content

Commit b472bcc

Browse files
authored
Fix dashboard help component position (baserow#4230)
1 parent 978b9b1 commit b472bcc

4 files changed

Lines changed: 22 additions & 18 deletions

File tree

premium/backend/tests/baserow_premium_tests/fields/test_ai_field_type.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pytest
44
from baserow_premium.fields.field_types import AIFieldType
55
from baserow_premium.fields.models import AIField
6+
from pytest_unordered import unordered
67
from rest_framework.status import HTTP_200_OK, HTTP_400_BAD_REQUEST, HTTP_404_NOT_FOUND
78

89
from baserow.contrib.database.fields.dependencies.models import FieldDependency
@@ -1259,15 +1260,16 @@ def test_create_ai_field_with_references(premium_data_fixture):
12591260
ai_prompt=f"concat('test:',get('fields.field_{ai_field.id}'))",
12601261
)
12611262

1262-
deps = list(FieldDependency.objects.all().order_by("dependant", "dependency"))
1263+
deps = list(FieldDependency.objects.values("dependant_id", "dependency_id"))
12631264

12641265
assert len(deps) == 3
1265-
assert deps[0].dependant_id == ai_field.id
1266-
assert deps[0].dependency_id == text_field.id
1267-
assert deps[1].dependant_id == ai_field.id
1268-
assert deps[1].dependency_id == other_text_field.id
1269-
assert deps[2].dependency_id == ai_field.id
1270-
assert deps[2].dependant_id == other_ai_field.id
1266+
assert deps == unordered(
1267+
[
1268+
{"dependant_id": ai_field.id, "dependency_id": text_field.id},
1269+
{"dependant_id": ai_field.id, "dependency_id": other_text_field.id},
1270+
{"dependant_id": other_ai_field.id, "dependency_id": ai_field.id},
1271+
]
1272+
)
12711273

12721274

12731275
@pytest.mark.django_db

web-frontend/modules/core/assets/scss/components/dashboard.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,7 @@
283283
margin: 0;
284284
font-size: 12px;
285285
}
286+
287+
.dashboard__help {
288+
@include absolute(auto, 32px, 0, auto);
289+
}

web-frontend/modules/core/components/dashboard/DashboardHelp.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
v-if="displayAlert"
44
type="blank"
55
close-button
6-
position="bottom"
6+
class="dashboard__help"
77
:width="396"
88
@close="handleAlertClose"
99
>

web-frontend/modules/core/pages/workspace.vue

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,17 +198,15 @@
198198
ref="createApplicationContext"
199199
:workspace="selectedWorkspace"
200200
></CreateApplicationContext>
201-
<DashboardHelp
202-
v-if="dashboardHelpComponents.length === 0"
203-
></DashboardHelp>
204-
<template v-else>
205-
<component
206-
:is="component"
207-
v-for="(component, index) in dashboardHelpComponents"
208-
:key="index"
209-
></component>
210-
</template>
211201
</div>
202+
<DashboardHelp v-if="dashboardHelpComponents.length === 0"></DashboardHelp>
203+
<template v-else>
204+
<component
205+
:is="component"
206+
v-for="(component, index) in dashboardHelpComponents"
207+
:key="index"
208+
></component>
209+
</template>
212210
<TemplateModal
213211
ref="templateModal"
214212
:workspace="selectedWorkspace"

0 commit comments

Comments
 (0)