Skip to content

Release v-1-16-0 #39

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

Merged
merged 12 commits into from
Sep 5, 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
2 changes: 1 addition & 1 deletion dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ COPY package*.json /app/
ENV NEXT_TELEMETRY_DISABLED 1
ENV IS_DEV 1

RUN npm install --also=dev
RUN npm install --include=dev

ENTRYPOINT /usr/local/bin/npm run dev
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ export default function SearchGroups() {
const fullSearchCopy = jsonCopy(fullSearchStore);
const formControlsIdx = fullSearchCopy[SearchGroup.ORDER_STATEMENTS].groupElements['orderBy'].find((el) => el['orderByKey'] == StaticOrderByKeys.RANDOM);
formControlsIdx['seedString'] = value ?? generateRandomSeed();
formControlsIdx['active'] = true;
formControlsIdx['color'] = getActiveNegateGroupColor(formControlsIdx);
dispatch(setFullSearchStore(fullSearchCopy));
updateSearchParams(fullSearchCopy);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function SimilaritySearchModal() {
useEffect(() => {
setAcceptButton({ ...ACCEPT_BUTTON, emitFunction: requestSimilaritySearch, disabled: selectedEmbedding == null });
setSecondAcceptButton({ ...SECOND_ACCEPT_BUTTON, emitFunction: requestSimilaritySearchWithoutFilter, useButton: filterAttributesSS, disabled: selectedEmbedding == null });
}, [modalSS, selectedEmbedding, filterAttributesSS]);
}, [modalSS, selectedEmbedding, filterAttributesSS, filterAttributesForm]);

const [acceptButton, setAcceptButton] = useState<ModalButton>(ACCEPT_BUTTON);
const [secondAcceptButton, setSecondAcceptButton] = useState<ModalButton>(SECOND_ACCEPT_BUTTON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export default function SyncRecordsModal(props: SyncRecordsModalProps) {
<h1 className="text-lg text-gray-900 mb-2 text-center inline-flex items-center gap-x-1">Info
{syncing ? (<LoadingIcon color="blue" />) : (<IconInfoCircle className="text-blue-400" />)}
</h1>
<div className="text-sm text-gray-700 flex flex-col gap-y-2 mb-2 font-medium">
<div className="text-sm text-gray-700 flex flex-col gap-y-2 mb-2 font-medium" style={{
maxHeight: 'calc(100vh - 250px)', overflowY: 'auto'
}}>
<div> {syncRecordsModal.syncModalAmount} changes to be synchronized: </div>
<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' }}>
<span className="bg-white font-semibold h-full w-full inline-flex items-center justify-center">Record
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,15 @@ export default function HeuristicsHeader(props: HeuristicsHeaderProps) {
</div>
<div className="grid grid-cols-1 gap-4 xs:flex xs:gap-0 flex-row items-center mt-2 xl:mt-0">
{labelingTasks && labelingTasks.length > 0 ? (<Tooltip content={TOOLTIPS_DICT.HEURISTICS.ENABLED_NEW_HEURISTIC} color="invert" placement="top">
<Dropdown2 options={NEW_HEURISTICS} buttonName="New heuristic" tooltipsArray={[null, null]}
disabledOptions={[false, false]}
selectedOption={(option: string) => executeOption(option)} buttonClasses={`${style.actionsHeight} text-xs whitespace-nowrap`} dropdownClasses="mr-3" dropdownItemsWidth='w-40' dropdownWidth='w-32'
iconsArray={['IconCode', 'IconBolt']} useFillForIcons={[false, true]} />
{/* removed zero shot & crowd labeler from NEW_HEURISTICS => needs matching arrays
<Dropdown2 options={NEW_HEURISTICS} buttonName="New heuristic" tooltipsArray={[null, null, null, isManaged ? null : 'Only available for managed projects']}
disabledOptions={[false, false, !(labelingTasks && labelingTasks.length > 0), !isManaged]}
selectedOption={(option: string) => executeOption(option)} buttonClasses={`${style.actionsHeight} text-xs whitespace-nowrap`} dropdownClasses="mr-3" dropdownItemsWidth='w-40' dropdownWidth='w-32'
iconsArray={['IconCode', 'IconBolt', 'IconSparkles', 'IconUsers']} useFillForIcons={[false, true, true, false]} />
iconsArray={['IconCode', 'IconBolt', 'IconSparkles', 'IconUsers']} useFillForIcons={[false, true, true, false]} /> */}
</Tooltip>) : (<Tooltip content={TOOLTIPS_DICT.HEURISTICS.DISABLED_NEW_HEURISTIC} color="invert">
<button type="button" disabled={true}
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export default function HeuristicRunButtons(props: HeuristicRunButtonsProps) {

function runHeuristic() {
setJustClickedRun(true);
props.justClickedRun(true);
if (props.justClickedRun) props.justClickedRun(true);
createTask(projectId, currentHeuristic.id, (res) => {
setJustClickedRun(false);
props.justClickedRun(false);
if (props.justClickedRun) props.justClickedRun(false);
if (currentHeuristic.informationSourceType === InformationSourceType.LABELING_FUNCTION) {
props.updateDisplayLogWarning(false);

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

function runHeuristicAndWeaklySupervise() {
setJustClickedRun(true);
props.justClickedRun(true);
if (props.justClickedRun) props.justClickedRun(true);
runThenWeakSupervision(projectId, currentHeuristic.id, currentHeuristic.labelingTaskId, (res) => {
setJustClickedRun(false);
props.justClickedRun(false);
if (props.justClickedRun) props.justClickedRun(false);
if (currentHeuristic.informationSourceType === InformationSourceType.LABELING_FUNCTION) {
props.updateDisplayLogWarning(false);
}
Expand Down
22 changes: 11 additions & 11 deletions src/components/shared/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function Sidebar() {
</Tooltip>
</div>}
{user.role === UserRole.ENGINEER && <div
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
<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'}`}>
<div className={`relative z-50`}>
<a href={`/refinery/projects/${project.id}/data-browser`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/data-browser`) }}
Expand All @@ -116,7 +116,7 @@ export default function Sidebar() {
</div>
</Tooltip>
</div>}
<div className={`flex items-center justify-center overflow-visible ${user?.role == 'ENGINEER' ? 'mt-10 2xl:mt-12' : ''}`}>
<div className={`flex items-center justify-center overflow-visible ${user?.role == 'ENGINEER' ? 'mt-9 2xl:mt-12' : ''}`}>
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.LABELING} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
<div className={`relative z-50`}>
<a href={`/refinery/projects/${project.id}/labeling`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/labeling`) }}
Expand All @@ -127,7 +127,7 @@ export default function Sidebar() {
</Tooltip>
</div>
{user.role === UserRole.ENGINEER && <div
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.HEURISTICS} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
<div className={`relative z-50`}>
<a href={`/refinery/projects/${project.id}/heuristics`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/heuristics`) }}
Expand All @@ -138,7 +138,7 @@ export default function Sidebar() {
</Tooltip>
</div>}
{user.role === UserRole.ENGINEER && <div
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.SETTINGS}>
<div className={`relative z-50`}>
<a href={`/refinery/projects/${project.id}/settings`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/settings`) }}
Expand All @@ -149,7 +149,7 @@ export default function Sidebar() {
</Tooltip>
</div>}
{(isAdmin && isManaged) && <div
className="flex items-center justify-center overflow-visible mt-10 2xl:mt-12">
className="flex items-center justify-center overflow-visible mt-9 2xl:mt-12">
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.ADMIN} className={`${project.numDataScaleUploaded == 0 ? 'pointer-events-none cursor-not-allowed' : 'cursor-pointer'}`}>
<div className={`relative z-50 opacity-100 cursor-pointer`}>
<a href={`/refinery/projects/${project.id}/admin`} onClick={(e: any) => { e.preventDefault(); router.push(`/projects/${project.id}/admin`) }}
Expand Down Expand Up @@ -177,7 +177,7 @@ export default function Sidebar() {
</Tooltip>
</div>}
</>}
<div className={`flex items-center justify-center overflow-visible ${isManaged ? (project?.id !== undefined ? 'mt-6' : '') : 'mt-10 2xl:mt-12'}`}>
<div className={`flex items-center justify-center overflow-visible ${isManaged ? (project?.id !== undefined ? 'mt-6' : '') : 'mt-9 2xl:mt-12'}`}>
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.API} className="relative z-50">
<a href="https://github.com/code-kern-ai/kern-python" target="_blank"
rel="noopener noreferrer" className="circle text-white">
Expand All @@ -187,7 +187,7 @@ export default function Sidebar() {
</div>
</div>

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

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

<div className="flex-shrink-0 flex pt-3 pb-10 justify-center">
<div className="flex-shrink-0 flex pt-3 justify-center">
<Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.VERSION_OVERVIEW}>
<div onClick={requestVersionOverview} id="refineryVersion"
className="z-50 tooltip tooltip-right cursor-pointer select-none text-white flex items-center mr-1">
v1.15.0
v1.16.0
{hasUpdates && <Tooltip placement="right" trigger="hover" color="invert" content={TOOLTIPS_DICT.SIDEBAR.NEWER_VERSION_AVAILABLE} >
<IconAlertCircle className="h-5 w-5 text-yellow-700" />
</Tooltip>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,5 @@ export function postProcessUniqueValues(uniqueValues: any, attributesSortOrder:
export function getActiveNegateGroupColor(group) {
if (!group['active']) return null;
if (group['negate']) return '#ef4444'
return '#2563eb';
return '#4e46e5';
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { parseUTC } from "@/submodules/javascript-functions/date-parser";
import { getColorStruct, mapInformationSourceStatsGlobal } from "./shared-helper";

export const ACTIONS_DROPDOWN_OPTIONS = ['Select all', 'Deselect all', 'Run selected', 'Delete selected'];
export const NEW_HEURISTICS = ['Labeling function', 'Active learning', 'Zero-shot', 'Crowd labeler'];
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

export function postProcessHeuristics(heuristics: any, projectId: string): Heuristic[] {
if (!heuristics) return [];
Expand Down
2 changes: 1 addition & 1 deletion submodules/tailwind-config
Loading