Skip to content
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
6 changes: 5 additions & 1 deletion .github/workflows/extralit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ jobs:
run: |
pdm run test-cov tests/unit

- name: Check test status
if: steps.tests-unit.outcome == 'failure'
run: exit 1

- name: Run integration tests
id: tests-integration
continue-on-error: true
Expand All @@ -119,7 +123,7 @@ jobs:
fail_ci_if_error: false

- name: Check test status
if: steps.tests-unit.outcome == 'failure' || steps.tests-integration.outcome == 'failure'
if: steps.tests-integration.outcome == 'failure'
run: exit 1

- name: Build package
Expand Down
2 changes: 1 addition & 1 deletion .kiro/specs/papers-library-importer/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def upload_reference_documents_job(
Note to reuse existing styles in extralit-frontend/assets/scss/base/base.scss, extralit-frontend/assets/scss/abstract/variables/_variables.scss and existing components in `components/base` where possible to keep similar the design system and code reuse and best practices.

- `extralit-frontend/components/base`:
base-action-tooltip, base-badge, base-banner, base-brand-icon, base-breadcrumbs, base-button, base-card, base-checkbox, base-code, base-collpasable-panel, base-date, base-documentation-viewer, base-dropdown, base-feedback, base-icon, base-input, base-loading, base-modal, base-pdf-viewer, base-progress, base-radio-button, base-range, base-render-html, base-render-markdown, base-render-table, base-resizable, base-scroll, base-search-bar, base-separator, base-shapes, base-slider, base-spinner, base-switch, base-tabs, base-tag, base-toast, base-tooltip, base-topbar-brand
BaseActionTooltip, base-badge, base-banner, base-brand-icon, base-breadcrumbs, base-button, base-card, base-checkbox, base-code, base-collpasable-panel, base-date, base-documentation-viewer, base-dropdown, base-feedback, base-icon, base-input, base-loading, base-modal, base-pdf-viewer, base-progress, base-radio-button, base-range, base-render-html, base-render-markdown, base-render-table, base-resizable, base-scroll, base-search-bar, base-separator, base-shapes, base-slider, base-spinner, base-switch, base-tabs, base-tag, base-toast, base-tooltip, base-topbar-brand


#### 1. Home Page Integration (`extralit-frontend/pages/index.vue`)
Expand Down
8 changes: 4 additions & 4 deletions .kiro/steering/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ extralit-frontend/
```typescript
export const useMyViewModel = (props) => {
const dependency = useResolve(MyUseCase);

const methodOne = () => {
// implementation
};

const methodTwo = async (param) => {
// implementation
};

return {
dependency,
methodOne,
Expand Down Expand Up @@ -222,4 +222,4 @@ examples/
- **Vue/TypeScript**: PascalCase for components, camelCase for utilities
- **API endpoints**: kebab-case in URLs, snake_case in Python
- **Database**: snake_case for tables and columns
- **CSS classes**: kebab-case with BEM methodology where applicable
- **CSS classes**: kebab-case with BEM methodology where applicable
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ coverage:
patch:
default:
enabled: false
comment: false

flags:
frontend:
Expand Down
19,233 changes: 0 additions & 19,233 deletions examples/document_extraction/LLM_extractions.ipynb

This file was deleted.

2,908 changes: 0 additions & 2,908 deletions examples/document_extraction/PDF_preprocessing.ipynb

This file was deleted.

1,144 changes: 566 additions & 578 deletions examples/document_extraction/setup_workspace.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion extralit-frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ These are the section headers that we use:
* "Security" in case of vulnerabilities.
-->

## [Extralit] [0.6.1](https://github.com/extralit/extralit/compare/v0.5.0...v0.6.1)

## [Extralit] [Unreleased](https://github.com/extralit/extralit/compare/v0.5.0...v0.6.1)
### Changed
- Refactored the frontend to use a single fetchDocument method that queries documents by any identifier and workspace, replacing the previous fetchDocumentByID and fetchDocumentByPubmedID methods. The view model and use case now expect and handle the new API response format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</span>
</li>
</ul>
<!-- <base-action-tooltip :tooltip="$t('copied')">
<BaseActionTooltip :tooltip="$t('copied')">
<a
v-if="copyButton"
class="breadcrumbs__copy"
Expand All @@ -45,7 +45,7 @@
>
<svgicon name="copy" width="16" height="16" />
</a>
</base-action-tooltip> -->
</BaseActionTooltip>
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions extralit-frontend/components/base/base-code/BaseCode.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<base-action-tooltip class="button" :tooltip="t('copied')">
<BaseActionTooltip class="button" :tooltip="t('copied')">
<a href="#" @click.prevent="copy(code)">
<svgicon name="copy" width="16" height="16" />
</a>
</base-action-tooltip>
</BaseActionTooltip>
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ export default {
},

showCancelConfirmation() {
if (confirm(this.$t("common.confirmCancel"))) {
if (confirm(this.$t("button.confirmCancel"))) {
this.$emit("cancel");
}
},

showCloseConfirmation() {
if (confirm(this.$t("common.confirmCancel"))) {
if (confirm(this.$t("button.confirmCancel"))) {
this.$emit("close");
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<slot name="up" />
</div>

<div class="resizable-h__bar" ref="resizableBar">
<div ref="resizableBar" class="resizable-h__bar">
<div class="resizable-h__bar__inner" />
</div>
<div class="resizable-h__down" v-if="!collapsable">
<div v-if="!collapsable" class="resizable-h__down">
<slot name="down" />
</div>
<BaseCollapsablePanel
Expand Down Expand Up @@ -97,8 +97,8 @@ export default {

mounted() {
this.resizer = this.$refs.resizableBar;
this.upSide = this.resizer.previousElementSibling;
this.downSide = this.resizer.nextElementSibling;
this.upSide = this.resizer?.previousElementSibling;
this.downSide = this.resizer?.nextElementSibling;

this.limitElementHeight(this.upSide);
if (!this.collapsable) {
Expand All @@ -125,7 +125,7 @@ export default {
}
},
destroyed() {
this.resizer.removeEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
this.resizer?.removeEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
},
methods: {
savePosition() {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="resizable-v" :class="resizing ? '--v-resizing' : ''">
<div class="resizable-v__left"><slot name="left" /></div>

<div class="resizable-v__bar" ref="resizableBar">
<div ref="resizableBar" class="resizable-v__bar">
<div class="resizable-v__bar__inner" />
</div>

Expand Down Expand Up @@ -64,7 +64,7 @@ export default {
}
},
destroyed() {
this.resizer.removeEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
this.resizer?.removeEventListener(EVENT.MOUSE_DOWN, this.mouseDownHandler);
},
methods: {
limitElementWidth(element) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,21 @@
</section>
</template>
<template #downHeader>
<p v-text="$t('document')" />
<p v-text="$t('home.documents')" />
</template>
<template #downHeaderExpanded>
<p v-text="$t('document')" />
<p v-text="$t('home.documents')" />
</template>
<template #downContent>
<PDFViewer :url="document.url" :file-name="document.file_name" :pageNumber="document.page_number" />
<PDFViewer
v-if="document.url"
:url="document.url"
:file-name="document.file_name"
:pageNumber="document.page_number"
/>
<div v-else class="no-document-message">
<p>{{ $t("document.notFound") }}</p>
</div>
</template>
</HorizontalResizable>
</template>
Expand Down Expand Up @@ -68,22 +76,10 @@
</template>
</HorizontalResizable>
</template>
<BaseCollapsablePanel
hideOnDesktop
:isExpanded="expandedGuidelines"
@toggle-expand="expandedGuidelines = !expandedGuidelines"
>
<template #panelHeader>
<p v-text="$t('document')" />
</template>
<template #panelContent>
<PDFViewer :url="document.url" :file-name="document.file_name" :pageNumber="document.page_number" />
</template>
</BaseCollapsablePanel>
</VerticalResizable>
</template>

<script>
<script lang="ts">
import { useFocusAnnotationViewModel } from "./useFocusAnnotationViewModel";
import { useDocumentViewModel } from "./useDocumentViewModel";

Expand Down Expand Up @@ -230,4 +226,13 @@ export default {
display: block;
}
}

.no-document-message {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: var(--fg-secondary);
font-style: italic;
}
</style>
Loading
Loading