Skip to content

Commit

Permalink
Entity titles in suggestions table are now links to the entity
Browse files Browse the repository at this point in the history
  • Loading branch information
konzz committed Sep 20, 2024
1 parent 04bbe65 commit abafd81
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 36 deletions.
71 changes: 38 additions & 33 deletions app/react/App/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
*/

/*
Expand Down Expand Up @@ -211,6 +211,8 @@ textarea {
/* 1 */
line-height: inherit;
/* 1 */
letter-spacing: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
Expand All @@ -234,9 +236,9 @@ select {
*/

button,
[type='button'],
[type='reset'],
[type='submit'] {
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
Expand Down Expand Up @@ -933,6 +935,10 @@ input[type="range"]::-ms-fill-lower {
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}

::backdrop {
Expand Down Expand Up @@ -983,6 +989,10 @@ input[type="range"]::-ms-fill-lower {
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}

.container {
Expand Down Expand Up @@ -1750,10 +1760,6 @@ input[type="range"]::-ms-fill-lower {
margin-bottom: 1rem;
}

.-ml-0 {
margin-left: -0px;
}

.-ml-0\.5 {
margin-left: -0.125rem;
}
Expand Down Expand Up @@ -2402,12 +2408,6 @@ input[type="range"]::-ms-fill-lower {
gap: 2rem;
}

.space-x-0 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0px * var(--tw-space-x-reverse));
margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-0\.5 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.125rem * var(--tw-space-x-reverse));
Expand Down Expand Up @@ -3462,6 +3462,11 @@ input[type="range"]::-ms-fill-lower {
color: rgb(165 180 252 / var(--tw-text-opacity));
}

.text-primary-500 {
--tw-text-opacity: 1;
color: rgb(99 102 241 / var(--tw-text-opacity));
}

.text-primary-700 {
--tw-text-opacity: 1;
color: rgb(67 56 202 / var(--tw-text-opacity));
Expand Down Expand Up @@ -4134,97 +4139,97 @@ input[type="range"]::-ms-fill-lower {
display: none;
}

:is(.dark .dark\:border-gray-600) {
.dark\:border-gray-600:is(.dark *) {
--tw-border-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-border-opacity));
}

:is(.dark .dark\:\!bg-primary-600) {
.dark\:\!bg-primary-600:is(.dark *) {
--tw-bg-opacity: 1 !important;
background-color: rgb(79 70 229 / var(--tw-bg-opacity)) !important;
}

:is(.dark .dark\:\!bg-primary-700) {
.dark\:\!bg-primary-700:is(.dark *) {
--tw-bg-opacity: 1 !important;
background-color: rgb(67 56 202 / var(--tw-bg-opacity)) !important;
}

:is(.dark .dark\:bg-blue-600) {
.dark\:bg-blue-600:is(.dark *) {
--tw-bg-opacity: 1;
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
}

:is(.dark .dark\:bg-gray-600) {
.dark\:bg-gray-600:is(.dark *) {
--tw-bg-opacity: 1;
background-color: rgb(75 85 99 / var(--tw-bg-opacity));
}

:is(.dark .dark\:bg-gray-700) {
.dark\:bg-gray-700:is(.dark *) {
--tw-bg-opacity: 1;
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

:is(.dark .dark\:bg-gray-800) {
.dark\:bg-gray-800:is(.dark *) {
--tw-bg-opacity: 1;
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
}

:is(.dark .dark\:text-error-400) {
.dark\:text-error-400:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(244 114 182 / var(--tw-text-opacity));
}

:is(.dark .dark\:text-gray-400) {
.dark\:text-gray-400:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
}

:is(.dark .dark\:text-gray-500) {
.dark\:text-gray-500:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
}

:is(.dark .dark\:text-white) {
.dark\:text-white:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}

:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder {
.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder {
--tw-placeholder-opacity: 1;
color: rgb(156 163 175 / var(--tw-placeholder-opacity));
}

:is(.dark .dark\:placeholder-gray-400)::placeholder {
.dark\:placeholder-gray-400:is(.dark *)::placeholder {
--tw-placeholder-opacity: 1;
color: rgb(156 163 175 / var(--tw-placeholder-opacity));
}

:is(.dark .dark\:hover\:\!bg-primary-700:hover) {
.dark\:hover\:\!bg-primary-700:hover:is(.dark *) {
--tw-bg-opacity: 1 !important;
background-color: rgb(67 56 202 / var(--tw-bg-opacity)) !important;
}

:is(.dark .dark\:hover\:bg-blue-700:hover) {
.dark\:hover\:bg-blue-700:hover:is(.dark *) {
--tw-bg-opacity: 1;
background-color: rgb(67 56 202 / var(--tw-bg-opacity));
}

:is(.dark .dark\:hover\:bg-gray-600:hover) {
.dark\:hover\:bg-gray-600:hover:is(.dark *) {
--tw-bg-opacity: 1;
background-color: rgb(75 85 99 / var(--tw-bg-opacity));
}

:is(.dark .dark\:hover\:text-white:hover) {
.dark\:hover\:text-white:hover:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}

:is(.dark .dark\:focus\:border-blue-500:focus) {
.dark\:focus\:border-blue-500:focus:is(.dark *) {
--tw-border-opacity: 1;
border-color: rgb(99 102 241 / var(--tw-border-opacity));
}

:is(.dark .dark\:focus\:ring-blue-500:focus) {
.dark\:focus\:ring-blue-500:focus:is(.dark *) {
--tw-ring-opacity: 1;
--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
}
Expand Down
1 change: 1 addition & 0 deletions app/react/Entities/components/EntityViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ const mapStateToProps = state => {
formState: state.entityView.entityFormState,
entityState: state.entityView.entityForm,
// Is this used at all?
// ¯\_(ツ)_/¯
library: state.library,
// relationships v2
newRelationshipsEnabled: state.settings?.collection?.get('features')?.get('newRelationships'),
Expand Down
8 changes: 5 additions & 3 deletions app/react/V2/Routes/Settings/IX/components/TableElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import { Cell, CellContext, Row, createColumnHelper } from '@tanstack/react-table';
import { Link } from 'react-router-dom';
import { CheckCircleIcon } from '@heroicons/react/24/outline';
import { Translate } from 'app/I18N';
import { I18NLink, Translate } from 'app/I18N';

Check failure on line 7 in app/react/V2/Routes/Settings/IX/components/TableElements.tsx

View workflow job for this annotation

GitHub Actions / eslint

'I18NLink' is defined but never used
import { Button, Pill } from 'V2/Components/UI';
import { ClientPropertySchema, ClientTemplateSchema } from 'app/istore';
import { EmbededButton } from 'V2/Components/UI/EmbededButton';
Expand Down Expand Up @@ -201,8 +201,10 @@ const OpenPDFButton = ({
};

const TitleCell = ({ cell, row }: CellContext<TableSuggestion, TableSuggestion['fileId']>) => (
<div className="text-xs font-normal text-gray-900">
{cell.getValue()} ({row.original.language})
<div className="text-sm font-normal text-primary-700">
<a href={`/entity/${row.original.sharedId}`} target="_blank" rel="noreferrer">
{cell.getValue()} ({row.original.language})
</a>
</div>
);

Expand Down

0 comments on commit abafd81

Please sign in to comment.