Skip to content

Commit 665d3a9

Browse files
anmarhindiJWittmeyerlumburovskalina
authored
Release v-1-16-0 (#39)
* sub ref update * fix build warning & version * Running active learners runs into an error (FE side) * Clicking on ‘Seed’ should activate the random filter automatically * Filter attributes for similarity search are not sent correctly * Overflow edit view of records + no scroll * Removes crowd & zero shot heuristics UI creation button * edit records page cannot scroll to save (img attached) * UX improvement - color blue to purple on data browser filters * Submodules merged --------- Co-authored-by: JWittmeyer <[email protected]> Co-authored-by: JWittmeyer <[email protected]> Co-authored-by: Lina <[email protected]>
1 parent 6fa1730 commit 665d3a9

File tree

11 files changed

+32
-23
lines changed

11 files changed

+32
-23
lines changed

dev.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ COPY package*.json /app/
99
ENV NEXT_TELEMETRY_DISABLED 1
1010
ENV IS_DEV 1
1111

12-
RUN npm install --also=dev
12+
RUN npm install --include=dev
1313

1414
ENTRYPOINT /usr/local/bin/npm run dev

src/components/projects/projectId/data-browser/SearchGroups.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ export default function SearchGroups() {
509509
const fullSearchCopy = jsonCopy(fullSearchStore);
510510
const formControlsIdx = fullSearchCopy[SearchGroup.ORDER_STATEMENTS].groupElements['orderBy'].find((el) => el['orderByKey'] == StaticOrderByKeys.RANDOM);
511511
formControlsIdx['seedString'] = value ?? generateRandomSeed();
512+
formControlsIdx['active'] = true;
513+
formControlsIdx['color'] = getActiveNegateGroupColor(formControlsIdx);
512514
dispatch(setFullSearchStore(fullSearchCopy));
513515
updateSearchParams(fullSearchCopy);
514516
}

src/components/projects/projectId/data-browser/modals/SimilaritySeachModal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function SimilaritySearchModal() {
6161
useEffect(() => {
6262
setAcceptButton({ ...ACCEPT_BUTTON, emitFunction: requestSimilaritySearch, disabled: selectedEmbedding == null });
6363
setSecondAcceptButton({ ...SECOND_ACCEPT_BUTTON, emitFunction: requestSimilaritySearchWithoutFilter, useButton: filterAttributesSS, disabled: selectedEmbedding == null });
64-
}, [modalSS, selectedEmbedding, filterAttributesSS]);
64+
}, [modalSS, selectedEmbedding, filterAttributesSS, filterAttributesForm]);
6565

6666
const [acceptButton, setAcceptButton] = useState<ModalButton>(ACCEPT_BUTTON);
6767
const [secondAcceptButton, setSecondAcceptButton] = useState<ModalButton>(SECOND_ACCEPT_BUTTON);

src/components/projects/projectId/edit-records/SyncRecordsModal.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ export default function SyncRecordsModal(props: SyncRecordsModalProps) {
7373
<h1 className="text-lg text-gray-900 mb-2 text-center inline-flex items-center gap-x-1">Info
7474
{syncing ? (<LoadingIcon color="blue" />) : (<IconInfoCircle className="text-blue-400" />)}
7575
</h1>
76-
<div className="text-sm text-gray-700 flex flex-col gap-y-2 mb-2 font-medium">
76+
<div className="text-sm text-gray-700 flex flex-col gap-y-2 mb-2 font-medium" style={{
77+
maxHeight: 'calc(100vh - 250px)', overflowY: 'auto'
78+
}}>
7779
<div> {syncRecordsModal.syncModalAmount} changes to be synchronized: </div>
7880
<div className="grid gap-px p-px bg-gray-200 rounded-lg" style={{ gridTemplateColumns: 'minmax(auto,100px) max-content minmax(auto,300px) minmax(auto,300px) 50px' }}>
7981
<span className="bg-white font-semibold h-full w-full inline-flex items-center justify-center">Record

src/components/projects/projectId/heuristics/HeuristicsHeader.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,15 @@ export default function HeuristicsHeader(props: HeuristicsHeaderProps) {
176176
</div>
177177
<div className="grid grid-cols-1 gap-4 xs:flex xs:gap-0 flex-row items-center mt-2 xl:mt-0">
178178
{labelingTasks && labelingTasks.length > 0 ? (<Tooltip content={TOOLTIPS_DICT.HEURISTICS.ENABLED_NEW_HEURISTIC} color="invert" placement="top">
179+
<Dropdown2 options={NEW_HEURISTICS} buttonName="New heuristic" tooltipsArray={[null, null]}
180+
disabledOptions={[false, false]}
181+
selectedOption={(option: string) => executeOption(option)} buttonClasses={`${style.actionsHeight} text-xs whitespace-nowrap`} dropdownClasses="mr-3" dropdownItemsWidth='w-40' dropdownWidth='w-32'
182+
iconsArray={['IconCode', 'IconBolt']} useFillForIcons={[false, true]} />
183+
{/* removed zero shot & crowd labeler from NEW_HEURISTICS => needs matching arrays
179184
<Dropdown2 options={NEW_HEURISTICS} buttonName="New heuristic" tooltipsArray={[null, null, null, isManaged ? null : 'Only available for managed projects']}
180185
disabledOptions={[false, false, !(labelingTasks && labelingTasks.length > 0), !isManaged]}
181186
selectedOption={(option: string) => executeOption(option)} buttonClasses={`${style.actionsHeight} text-xs whitespace-nowrap`} dropdownClasses="mr-3" dropdownItemsWidth='w-40' dropdownWidth='w-32'
182-
iconsArray={['IconCode', 'IconBolt', 'IconSparkles', 'IconUsers']} useFillForIcons={[false, true, true, false]} />
187+
iconsArray={['IconCode', 'IconBolt', 'IconSparkles', 'IconUsers']} useFillForIcons={[false, true, true, false]} /> */}
183188
</Tooltip>) : (<Tooltip content={TOOLTIPS_DICT.HEURISTICS.DISABLED_NEW_HEURISTIC} color="invert">
184189
<button type="button" disabled={true}
185190
className="mr-3 inline-flex items-center justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-1.5 bg-white text-xs font-medium text-gray-700 opacity-50 cursor-not-allowed focus:ring-offset-2 focus:ring-offset-gray-400"

src/components/projects/projectId/heuristics/heuristicId/shared/HeuristicRunButtons.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export default function HeuristicRunButtons(props: HeuristicRunButtonsProps) {
2727

2828
function runHeuristic() {
2929
setJustClickedRun(true);
30-
props.justClickedRun(true);
30+
if (props.justClickedRun) props.justClickedRun(true);
3131
createTask(projectId, currentHeuristic.id, (res) => {
3232
setJustClickedRun(false);
33-
props.justClickedRun(false);
33+
if (props.justClickedRun) props.justClickedRun(false);
3434
if (currentHeuristic.informationSourceType === InformationSourceType.LABELING_FUNCTION) {
3535
props.updateDisplayLogWarning(false);
3636

@@ -40,10 +40,10 @@ export default function HeuristicRunButtons(props: HeuristicRunButtonsProps) {
4040

4141
function runHeuristicAndWeaklySupervise() {
4242
setJustClickedRun(true);
43-
props.justClickedRun(true);
43+
if (props.justClickedRun) props.justClickedRun(true);
4444
runThenWeakSupervision(projectId, currentHeuristic.id, currentHeuristic.labelingTaskId, (res) => {
4545
setJustClickedRun(false);
46-
props.justClickedRun(false);
46+
if (props.justClickedRun) props.justClickedRun(false);
4747
if (currentHeuristic.informationSourceType === InformationSourceType.LABELING_FUNCTION) {
4848
props.updateDisplayLogWarning(false);
4949
}

src/components/shared/sidebar/Sidebar.tsx

+11-11
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default function Sidebar() {
106106
</Tooltip>
107107
</div>}
108108
{user.role === UserRole.ENGINEER && <div
109-
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
109+
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
110110
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.DATA_BROWSER} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
111111
<div className={`relative z-50`}>
112112
<a href={`/refinery/projects/${project.id}/data-browser`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/data-browser`) }}
@@ -116,7 +116,7 @@ export default function Sidebar() {
116116
</div>
117117
</Tooltip>
118118
</div>}
119-
<div className={`flex items-center justify-center overflow-visible ${user?.role == 'ENGINEER' ? 'mt-10 2xl:mt-12' : ''}`}>
119+
<div className={`flex items-center justify-center overflow-visible ${user?.role == 'ENGINEER' ? 'mt-9 2xl:mt-12' : ''}`}>
120120
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.LABELING} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
121121
<div className={`relative z-50`}>
122122
<a href={`/refinery/projects/${project.id}/labeling`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/labeling`) }}
@@ -127,7 +127,7 @@ export default function Sidebar() {
127127
</Tooltip>
128128
</div>
129129
{user.role === UserRole.ENGINEER && <div
130-
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
130+
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
131131
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.HEURISTICS} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
132132
<div className={`relative z-50`}>
133133
<a href={`/refinery/projects/${project.id}/heuristics`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/heuristics`) }}
@@ -138,7 +138,7 @@ export default function Sidebar() {
138138
</Tooltip>
139139
</div>}
140140
{user.role === UserRole.ENGINEER && <div
141-
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
141+
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
142142
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.SETTINGS}>
143143
<div className={`relative z-50`}>
144144
<a href={`/refinery/projects/${project.id}/settings`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/settings`) }}
@@ -149,7 +149,7 @@ export default function Sidebar() {
149149
</Tooltip>
150150
</div>}
151151
{(isAdmin && isManaged) && <div
152-
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
152+
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
153153
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.ADMIN} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
154154
<div className={`relative z-50 opacity-100 cursor-pointer`}>
155155
<a href={`/refinery/projects/${project.id}/admin`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/admin`) }}
@@ -177,7 +177,7 @@ export default function Sidebar() {
177177
</Tooltip>
178178
</div>}
179179
</>}
180-
<div className={`flex items-center justify-center overflow-visible ${isManaged ? (project?.id !== undefined ? 'mt-6' : '') : 'mt-10 2xl:mt-12'}`}>
180+
<div className={`flex items-center justify-center overflow-visible ${isManaged ? (project?.id !== undefined ? 'mt-6' : '') : 'mt-9 2xl:mt-12'}`}>
181181
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.API} className="relative z-50">
182182
<a href="https://github.com/code-kern-ai/kern-python" target="_blank"
183183
rel="noopener noreferrer" className="circle text-white">
@@ -187,7 +187,7 @@ export default function Sidebar() {
187187
</div>
188188
</div>
189189

190-
{user.role === UserRole.ENGINEER && !isManaged && <div className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
190+
{user.role === UserRole.ENGINEER && !isManaged && <div className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
191191
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.JOIN_OUR_COMMUNITY}>
192192
<div className="relative z-50">
193193
<a href="https://discord.com/invite/qf4rGCEphW" target="_blank" rel="noopener noreferrer"
@@ -198,7 +198,7 @@ export default function Sidebar() {
198198
</Tooltip>
199199
</div>}
200200
</div>
201-
{!isFullScreen && <div className="flex items-center justify-center mt-10 2xl:mt-12">
201+
{!isFullScreen && <div className="flex items-center justify-center mt-9 2xl:mt-12">
202202
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.MAXIMIZE_SCREEN}>
203203
<button onClick={openFullScreen}
204204
className="z-50 cursor-pointer">
@@ -207,7 +207,7 @@ export default function Sidebar() {
207207
</Tooltip>
208208
</div>}
209209

210-
{isFullScreen && <div className="flex items-center justify-center mt-10 2xl:mt-12">
210+
{isFullScreen && <div className="flex items-center justify-center mt-9 2xl:mt-12">
211211
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.MINIMIZE_SCREEN}>
212212
<button onClick={closeFullScreen}
213213
className="z-50 cursor-pointer">
@@ -220,11 +220,11 @@ export default function Sidebar() {
220220
<AppSelectionDropdown cockpit={true} gates={true}></AppSelectionDropdown>
221221
</div>}
222222

223-
<div className="flex-shrink-0 flex pt-3 pb-10 justify-center">
223+
<div className="flex-shrink-0 flex pt-3 justify-center">
224224
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.VERSION_OVERVIEW}>
225225
<div onClick={requestVersionOverview} id="refineryVersion"
226226
className="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center mr-1">
227-
v1.15.0
227+
v1.16.0
228228
{hasUpdates && <Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.NEWER_VERSION_AVAILABLE} >
229229
<IconAlertCircle className="h-5 w-5 text-yellow-700" />
230230
</Tooltip>}

src/util/components/projects/projectId/data-browser/data-browser-helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,5 @@ export function postProcessUniqueValues(uniqueValues: any, attributesSortOrder:
209209
export function getActiveNegateGroupColor(group) {
210210
if (!group['active']) return null;
211211
if (group['negate']) return '#ef4444'
212-
return '#2563eb';
212+
return '#4e46e5';
213213
}

src/util/components/projects/projectId/heuristics/heuristics-helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { parseUTC } from "@/submodules/javascript-functions/date-parser";
77
import { getColorStruct, mapInformationSourceStatsGlobal } from "./shared-helper";
88

99
export const ACTIONS_DROPDOWN_OPTIONS = ['Select all', 'Deselect all', 'Run selected', 'Delete selected'];
10-
export const NEW_HEURISTICS = ['Labeling function', 'Active learning', 'Zero-shot', 'Crowd labeler'];
10+
export const NEW_HEURISTICS = ['Labeling function', 'Active learning']; // , 'Zero-shot', 'Crowd labeler' removed from UI to prevent usage -> will be fully removed in a future release
1111

1212
export function postProcessHeuristics(heuristics: any, projectId: string): Heuristic[] {
1313
if (!heuristics) return [];

0 commit comments

Comments
 (0)