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

Consume more tokens from core arches #31

Merged
merged 6 commits into from
Oct 30, 2024
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,5 +1,7 @@
import ko from 'knockout';

import { definePreset } from '@primevue/themes';
import { ArchesPreset, DEFAULT_THEME } from '@/arches/themes/default.ts';
import { routes } from '@/arches_references/routes.ts';
import ControlledListManager from '@/arches_references/plugins/ControlledListManager.vue';
import createVueApplication from 'utils/create-vue-application';
Expand All @@ -12,9 +14,31 @@ const router = createRouter({
routes,
});

const ControlledListsPreset = definePreset(ArchesPreset, {
semantic: {
iconSize: 'small',
},
components: {
button: {
root: {
label: {
fontWeight: 600,
},
},
},
},
});

const ControlledListsTheme = {
theme: {
...DEFAULT_THEME,
preset: ControlledListsPreset,
},
};

ko.components.register('controlled-list-manager', {
viewModel: function() {
createVueApplication(ControlledListManager).then((vueApp) => {
createVueApplication(ControlledListManager, ControlledListsTheme).then((vueApp) => {
vueApp.use(router);
vueApp.mount('#controlled-list-manager-mounting-point');
});
Expand Down
3 changes: 0 additions & 3 deletions arches_references/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,6 @@
# override this to permenantly display/hide the language switcher
SHOW_LANGUAGE_SWITCH = len(LANGUAGES) > 1

# TODO: remove when finalizing release
SILENCED_SYSTEM_CHECKS += ["arches.E002"]

# Location for test data fixtures
FIXTURE_DIRS = [os.path.join(APP_ROOT, "..", "tests", "fixtures", "data")]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,21 @@ provide(systemLanguageKey, systemLanguage);
<MainSplitter />
</div>
</div>
<Toast />
<Toast
:pt="{
summary: { fontSize: 'medium' },
detail: { fontSize: 'small' },
messageIcon: {
style: { marginTop: 'var(--p-toast-message-icon-margin-top)' },
},
}"
/>
<ConfirmDialog
:draggable="false"
:pt="{
root: {
style: {
fontSize: 'small',
},
},
header: {
style: {
background: 'var(--p-navigation)',
background: 'var(--p-navigation-header-color)',
color: 'white',
borderRadius: '1rem',
marginBottom: '1rem',
Expand All @@ -81,6 +84,7 @@ provide(systemLanguageKey, systemLanguage);
title: {
style: {
fontWeight: 800,
fontSize: 'small',
},
},
}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,21 +335,18 @@ const focusInput = () => {
<i
class="fa fa-pencil"
aria-hidden="true"
style="font-size: small"
></i>
</template>
<template #roweditorsaveicon>
<i
class="fa fa-check"
aria-hidden="true"
style="font-size: small"
></i>
</template>
<template #roweditorcancelicon>
<i
class="fa fa-undo"
aria-hidden="true"
style="font-size: small"
></i>
</template>
</Column>
Expand Down Expand Up @@ -408,4 +405,8 @@ const focusInput = () => {
:deep(.p-datatable-column-title) {
font-size: small;
}

i {
font-size: var(--p-icon-size);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ input {
}

.edit-controls i {
font-size: small;
font-size: var(--p-icon-size);
padding: 0.5rem;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const cancel = () => {
:aria-label="$gettext('Edit')"
@click="editing = true"
@keyup.enter="editing = true"
/>
></i>
</span>
<span
v-if="props.editable && editing"
Expand All @@ -110,15 +110,15 @@ const cancel = () => {
:aria-label="$gettext('Save edit')"
@click="save"
@keyup.enter="save"
/>
></i>
<i
role="button"
tabindex="0"
class="fa fa-undo"
:aria-label="$gettext('Cancel edit')"
@click="cancel"
@keyup.enter="cancel"
/>
></i>
</span>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ const { $gettext } = useGettext();
:label="$gettext('Dynamic')"
:style="{ width: '4rem' }"
/>
<h4 class="nodes-heading">
{{ $gettext("List used by these nodes") }}
</h4>
<div class="nodes">
<div
v-for="node in list.nodes"
:key="node.id"
>
<ReferenceNodeLink :node />
</div>
<div
v-if="list.nodes.length === 0"
:style="{ fontSize: 'small' }"
>
{{ $gettext("None") }}
<div class="nodes-heading">
<h4>{{ $gettext("List used by these nodes") }}</h4>
<div class="nodes">
<div
v-for="node in list.nodes"
:key="node.id"
>
<ReferenceNodeLink :node />
</div>
<div
v-if="list.nodes.length === 0"
:style="{ fontSize: 'small' }"
>
{{ $gettext("None") }}
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -80,6 +80,5 @@ h3 {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin: 1rem;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -361,21 +361,18 @@ const focusInput = () => {
<i
class="fa fa-pencil"
aria-hidden="true"
style="font-size: small"
></i>
</template>
<template #roweditorsaveicon>
<i
class="fa fa-check"
aria-hidden="true"
style="font-size: small"
></i>
</template>
<template #roweditorcancelicon>
<i
class="fa fa-undo"
aria-hidden="true"
style="font-size: small"
></i>
</template>
</Column>
Expand All @@ -391,7 +388,7 @@ const focusInput = () => {
:aria-label="$gettext('Delete')"
@click="issueDeleteValue(slotProps.data)"
@keyup.enter="issueDeleteValue(slotProps.data)"
/>
></i>
</template>
</Column>
</DataTable>
Expand All @@ -412,6 +409,10 @@ h4 {
margin-top: 0;
}

i {
font-size: var(--p-icon-size);
}

p {
font-weight: normal;
margin-top: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const { $gettext } = useGettext();
border: 1px solid #ddd;
padding: 4rem 3rem;
background: #f6f6f6;
border-radius: 0.5rem;
border-radius: var(--p-content-border-radius);
display: flex;
flex-direction: column;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const heading = computed(() => {
.header {
display: flex;
align-items: center;
background: var(--p-navigation);
background: var(--p-navigation-header-color);
color: white;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ const confirmDelete = () => {
acceptProps: {
label: $gettext("Delete"),
severity: shouldUseContrast() ? CONTRAST : DANGER,
outlined: true,
style: { fontSize: "small" },
},
rejectProps: {
label: $gettext("Cancel"),
severity: shouldUseContrast() ? CONTRAST : SECONDARY,
outlined: true,
style: { fontSize: "small" },
},
accept: async () => {
await deleteSelected().then(fetchListsAndPopulateTree);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ const ptNodeContent = ({ instance }: TreePassThroughMethodOptions) => {
style: { width: '100%', fontSize: 'small' },
},
},
filterIcon: { style: { display: 'flex' } },
pcFilterIconContainer: {
root: {
style: { top: '25%' },
},
},
wrapper: {
style: {
overflowY: 'auto',
Expand Down
1 change: 1 addition & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function generateConfig(): Promise<UserConfigExport> {
'**/themes/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'arches_references/constants.ts',
];

const rawData = fs.readFileSync(path.join(__dirname, '.frontend-configuration-settings.json'), 'utf-8');
Expand Down
Loading