Skip to content

Commit

Permalink
Merge pull request #243 from lukashornych/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
lukashornych authored Nov 26, 2024
2 parents 52adcb0 + 55201cb commit e69f841
Show file tree
Hide file tree
Showing 95 changed files with 1,918 additions and 334 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ You can try out evitaLab with evitaDB demo dataset at [demo.evitadb.io](https://

## Features

evitaLab is currently in early development stage, and features are being added as we go.

evitaLab allows you to:

- [x] inspect schemas
Expand All @@ -41,6 +39,8 @@ evitaLab allows you to:
- [x] manage server (status, tasks, JFR recordings)
- [x] manage catalogs and collections

evitaLab is still in active development and new features are being added fairly frequently.

## Running locally

To run evitaLab locally, you can use either of the following ways.
Expand Down Expand Up @@ -107,7 +107,7 @@ yarn install
yarn dev
```
You can find more indepth info about internal structure of evitaLab in [developer documentation](/documentation/developer/index.md).
You can find more indepth info about internal structure and guidelines of evitaLab in [developer documentation](/documentation/developer/index.md).
## Licence
Expand All @@ -116,5 +116,4 @@ You can find more indepth info about internal structure of evitaLab in [develope
## Contribution
Any contributions are welcome and appreciated. If you would like to contribute to evitaLab, feel free to open an issue
and submit a pull request. However, keep in mind that this project is still in an early development stage and features
may change or be completely removed.
and submit a pull request.
14 changes: 8 additions & 6 deletions documentation/developer/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export function useService(): Service {
}
```

For component tree dependency injection a `dependecies.ts` file should be created where the components for a feature are
For component tree dependency injection a `dependecies.ts` file should be created where the components for a feature are
places with proper injection keys and `provideX` and `injectX` methods so that the keys are not spread across components.

### UI

Complex components that access data should adhere to the [Model-View-ViewModel architecture](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel),
preferably in conjunction with the [mediator pattern](https://en.wikipedia.org/wiki/Mediator_pattern) in form of
preferably in conjunction with the [mediator pattern](https://en.wikipedia.org/wiki/Mediator_pattern) in form of
custom service for the component to abstract access to generic services.

![Component-service hierarchy](assets/component-service-hierarchy.svg)
Expand All @@ -56,13 +56,15 @@ VConfirmDialogButton

##### Tab windows

TODO document approach to creating new tab window types and available tooling

Use `VTabToolbar` for toolbars within tab window content.

##### Lists

Use `VListItemDivider` for delimiting list items in **each** non-menu lists.

Use `VListItemLazyIterator` if you need client-side with "load next" pagination for lists. Usually useful for
Use `VListItemLazyIterator` if you need client-side with "load next" pagination for lists. Usually useful for
optimizing GUI rendering for lots of components.

##### Expansion panels
Expand Down Expand Up @@ -111,13 +113,13 @@ The `master` branch is for the released versions of the evitaLab only. The `dev`
code is at, and to where the feature branches are merged into. Finally, feature branches are created for each issues
to fix a bug or create new feature. These are then merged into the `dev` branch for eventual release.

When fixing a bug or creating new feature, **always** create new feature branch from the `dev` branch. Or for hotfixes,
When fixing a bug or creating new feature, **always** create new feature branch from the `dev` branch. Or for hotfixes,
create new bug fixing branch from the `master`, but such branch cannot do more than fix a bug in non-breaking way.

### Commits

We use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for Git commit messages and pull requests
for 2 reasons:
We use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) for Git commit messages and pull requests
for 2 reasons:

- the commits are more transparent
- we have GitHub CI/CD hooked onto it, to automatically build and version the evitaLab
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@connectrpc/connect-web": "^1.4.0",
"@connectrpc/protoc-gen-connect-es": "^1.4.0",
"@ddietr/codemirror-themes": "^1.4.2",
"@lukashornych/codemirror-lang-evitaql": "1.2.5",
"@lukashornych/codemirror-lang-evitaql": "1.3.0",
"@mdi/font": "7.0.96",
"@types/dompurify": "^3.0.4",
"@types/keymaster": "^1.6.33",
Expand Down
22 changes: 20 additions & 2 deletions src/modules/backup-viewer/components/BackupViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import TaskList from '@/modules/task-viewer/components/TaskList.vue'
import BackupList from '@/modules/backup-viewer/components/BackupList.vue'
import BackupCatalogButton from '@/modules/backup-viewer/components/BackupCatalogButton.vue'
import RestoreLocalBackupFileButton from '@/modules/backup-viewer/components/RestoreLocalBackupFileButton.vue'
import { TabComponentExpose } from '@/modules/workspace/tab/model/TabComponentExpose'
import { SubjectPath } from '@/modules/workspace/status-bar/model/subject-path-status/SubjectPath'
import {
ConnectionSubjectPath
} from '@/modules/connection/workspace/status-bar/model/subject-path-status/ConnectionSubjectPath'
import { SubjectPathItem } from '@/modules/workspace/status-bar/model/subject-path-status/SubjectPathItem'
import { BackupViewerTabDefinition } from '@/modules/backup-viewer/model/BackupViewerTabDefinition'
const shownTaskStates: TaskState[] = [TaskState.WaitingForPrecondition, TaskState.Running, TaskState.Queued, TaskState.Failed]
const shownTaskTypes: string[] = [backupTaskName, restoreTaskName]
Expand All @@ -22,11 +29,22 @@ const { t } = useI18n()
const props = defineProps<TabComponentProps<BackupViewerTabParams, VoidTabData>>()
const emit = defineEmits<TabComponentEvents>()
defineExpose<TabComponentExpose>({
path(): SubjectPath | undefined {
return new ConnectionSubjectPath(
props.params.connection,
[SubjectPathItem.significant(
BackupViewerTabDefinition.icon(),
t('backupViewer.title')
)]
)
}
})
const taskListRef = ref<typeof TaskList>()
const backupListRef = ref<typeof BackupList>()
const path: List<string> = List([t('backupViewer.title')])
const title: List<string> = List.of(t('backupViewer.title'))
const backupsInPreparationPresent = ref<boolean>(false)
Expand All @@ -44,7 +62,7 @@ emit('ready')

<template>
<div class="backup-viewer">
<VTabToolbar prepend-icon="mdi-cloud-download-outline" :path="path">
<VTabToolbar :prepend-icon="BackupViewerTabDefinition.icon()" :title="title">
<template #append>
<VBtn icon @click="reloadBackups">
<VIcon>mdi-refresh</VIcon>
Expand Down
7 changes: 6 additions & 1 deletion src/modules/backup-viewer/model/BackupViewerTabDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ import { BackupViewerTabParams } from '@/modules/backup-viewer/model/BackupViewe
import BackupViewer from '@/modules/backup-viewer/components/BackupViewer.vue'

export class BackupViewerTabDefinition extends TabDefinition<BackupViewerTabParams, VoidTabData> {

constructor(title: string, params: BackupViewerTabParams) {
super(
undefined,
title,
'mdi-cloud-download-outline',
BackupViewerTabDefinition.icon(),
markRaw(BackupViewer as DefineComponent<any, any, any>),
params,
new VoidTabData()
)
}

static icon(): string {
return 'mdi-cloud-download-outline'
}
}
8 changes: 6 additions & 2 deletions src/modules/backup-viewer/service/BackupViewerTabFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { BackupViewerTabDefinition } from "../model/BackupViewerTabDefinition";
import { TabParamsDto } from "@/modules/workspace/tab/model/TabParamsDto";
import { BackupViewerTabParamsDto } from "../model/BackupViewerTabParamsDto";
import { BackupViewerTabParams } from '@/modules/backup-viewer/model/BackupViewerTabParams'
import { i18n } from '@/vue-plugins/i18n'

export const backupsTabFactoryInjectionKey: InjectionKey<BackupViewerTabFactory> = Symbol('BackupsTabFactory')

Expand All @@ -31,9 +32,12 @@ export class BackupViewerTabFactory {
)
}

// todo lho i18n
private constructTitle(connection: Connection): string {
return `Catalog backups [${connection.name}]`
return i18n.global.t(
'backupViewer.definition.title',
{ connectionName: connection.name }
)

}

private restoreTabParamsFromSerializable(json: TabParamsDto): BackupViewerTabParams {
Expand Down
16 changes: 10 additions & 6 deletions src/modules/base/component/VTabToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
import { computed } from 'vue'
import { List } from 'immutable'
import VTabToolbarTitle from '@/modules/base/component/VTabToolbarTitle.vue'
type Flag = {
title: string,
Expand All @@ -12,7 +13,7 @@ type Flag = {
const props = withDefaults(defineProps<{
prependIcon: string,
path: List<string>,
title: List<string>,
flags?: List<string>
}>(), {
flags: () => List()
Expand Down Expand Up @@ -46,11 +47,8 @@ const normalizedFlags = computed<List<Flag>>(() => {
/>

<VToolbarTitle class="ml-0 font-weight-bold">
<div style="display: flex">
<VBreadcrumbs
:items="path.toArray()"
class="pl-0 pr-0 pt-0 pb-0 mr-4"
/>
<div class="tab-toolbar__title">
<VTabToolbarTitle :title="title" />

<VChipGroup v-if="normalizedFlags">
<VChip
Expand All @@ -76,5 +74,11 @@ const normalizedFlags = computed<List<Flag>>(() => {
<style lang="scss" scoped>
.tab-toolbar {
z-index: 100;
&__title {
display: flex;
column-gap: 1rem;
align-items: center;
}
}
</style>
37 changes: 37 additions & 0 deletions src/modules/base/component/VTabToolbarTitle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup lang="ts">
import Immutable from 'immutable'
const props = defineProps<{
title: Immutable.List<string>
}>()
</script>

<template>
<div class="tab-toolbar-title">
<template v-for="(item, index) in title" :key="index">
<span
v-if="index < title.size - 1"
class="text-subtitle-1 text-disabled"
>
{{ item }}
</span>
<span v-else>
{{ item }}
</span>

<VIcon
v-if="(index + 1) < title.size"
icon="mdi-chevron-right"
size="16"
class="mx-1"
/>
</template>
</div>
</template>

<style lang="scss" scoped>
.tab-toolbar-title {
display: flex;
align-items: center;
}
</style>
5 changes: 4 additions & 1 deletion src/modules/base/component/VTreeViewItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ const props = withDefaults(defineProps<Props>(), {
const actionsOpened = ref<boolean>(false)
const emit = defineEmits<{
(e: 'click:action', value: string): void
(e: 'click:action', value: string): void,
(e: 'click:actionMenu'): void
}>()
function openActions(): void {
emit('click:actionMenu')
if (props.actions && props.actions.length > 0) {
actionsOpened.value = true
}
Expand Down Expand Up @@ -103,6 +105,7 @@ function openActions(): void {
<VIcon
v-bind="props"
class="text-gray-light"
@click="emit('click:actionMenu')"
>
mdi-dots-vertical
</VIcon>
Expand Down
39 changes: 0 additions & 39 deletions src/modules/code-editor/component/VCodeEditorStatusBar.vue

This file was deleted.

This file was deleted.

Loading

0 comments on commit e69f841

Please sign in to comment.