Skip to content
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

prompt activation frontend #12626

Open
wants to merge 76 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
44ebfe8
add type to table and color code it
emilia-friedberg Oct 14, 2024
ebf3272
finish updates to activities index page
emilia-friedberg Oct 14, 2024
f1428a7
possible to create a new activity with an ai type
emilia-friedberg Oct 14, 2024
2b0c837
nav updates
emilia-friedberg Oct 15, 2024
2e3f258
snapshot updates
emilia-friedberg Oct 15, 2024
620504b
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Oct 16, 2024
174bfe3
wip
emilia-friedberg Oct 17, 2024
f04d8fa
merge
emilia-friedberg Oct 17, 2024
d2e6849
wip before i mess up further
emilia-friedberg Oct 17, 2024
f2d56b9
wip -- actually saving working
emilia-friedberg Oct 18, 2024
0e47182
saving works and they populate correctly too!
emilia-friedberg Oct 18, 2024
cca177d
clean up
emilia-friedberg Oct 18, 2024
48b80fd
get invalid relevant texts populated on the activity form
emilia-friedberg Oct 18, 2024
97f63d7
small edits
emilia-friedberg Oct 18, 2024
71b1d87
tests
emilia-friedberg Oct 18, 2024
1cafc53
fix lint errors
emilia-friedberg Oct 18, 2024
795b881
remove trailing whitespace
emilia-friedberg Oct 18, 2024
7e6ccf3
clean up
emilia-friedberg Oct 18, 2024
04a90ba
fixes
emilia-friedberg Oct 18, 2024
3096028
fix test
emilia-friedberg Oct 18, 2024
c44829c
all refactors except service object
emilia-friedberg Oct 22, 2024
7357347
refactor gen ai stuff into a service object; tests still pass
emilia-friedberg Oct 22, 2024
308ac85
finish specs
emilia-friedberg Oct 22, 2024
db51f9e
fix lint errors
emilia-friedberg Oct 22, 2024
699a3cd
jamie's requested revisions
emilia-friedberg Oct 23, 2024
4fd2be9
other refactors
emilia-friedberg Oct 23, 2024
47b7528
merge develop
emilia-friedberg Oct 23, 2024
09575f3
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Oct 23, 2024
0b3dee0
thomas' revisions
emilia-friedberg Oct 23, 2024
f68e980
fixes
emilia-friedberg Oct 23, 2024
86bc644
try again
emilia-friedberg Oct 23, 2024
57ce9e2
datasets pages (#12473)
emilia-friedberg Oct 24, 2024
6e25b66
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Oct 24, 2024
65d43d7
Merge branch 'feat/update-evidence-cms-to-support-activity-types' of …
emilia-friedberg Oct 24, 2024
ef875f7
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Oct 28, 2024
46458be
individual dataset page (#12486)
emilia-friedberg Oct 30, 2024
e9005af
trial runner page pt 1 (#12503)
emilia-friedberg Nov 1, 2024
6409cd8
merge develop
emilia-friedberg Nov 1, 2024
3bed97a
trial runner page pt 2 (#12517)
emilia-friedberg Nov 7, 2024
29f87f5
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Nov 7, 2024
4a16f97
individual trial page part one (#12528)
emilia-friedberg Nov 13, 2024
bf15322
merge develop
emilia-friedberg Nov 13, 2024
df72855
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Nov 18, 2024
9448bd5
trial comparisons page (#12543)
emilia-friedberg Nov 18, 2024
8559859
some qa updates for evidence cms (#12569)
emilia-friedberg Nov 20, 2024
0f7ecef
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Nov 20, 2024
3b4d798
llm prompt templates page (#12582)
emilia-friedberg Nov 21, 2024
3196482
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Nov 22, 2024
5a4af03
Merge branch 'feat/update-evidence-cms-to-support-activity-types' of …
emilia-friedberg Nov 22, 2024
f955144
wip - now trying to reduce space
emilia-friedberg Nov 22, 2024
122ed5a
wip
emilia-friedberg Nov 26, 2024
853cda2
Merge branch 'develop' of https://github.com/empirical-org/Empirical-…
emilia-friedberg Nov 26, 2024
bf41ae6
Merge branch 'feat/update-evidence-cms-to-support-activity-types' of …
emilia-friedberg Nov 26, 2024
bfdbd32
favorite stuff is working
emilia-friedberg Nov 26, 2024
bbd92ea
wip
emilia-friedberg Dec 3, 2024
51a10cb
move some stuff around and allow for reactivation
emilia-friedberg Dec 3, 2024
0a787fc
always show textarea
emilia-friedberg Dec 3, 2024
2d8e61e
wip
emilia-friedberg Dec 3, 2024
13cdf9b
get modal working
emilia-friedberg Dec 3, 2024
b087db9
clean-up, i think
emilia-friedberg Dec 3, 2024
e71643d
merge
emilia-friedberg Dec 4, 2024
808d82c
adjust checkbox scss
emilia-friedberg Dec 4, 2024
a195e1d
Merge branch 'feat/update-evidence-cms-to-support-activity-types' of …
emilia-friedberg Dec 4, 2024
36d1e4f
looking good on the frontend
emilia-friedberg Dec 4, 2024
f2b6845
lint fixes
emilia-friedberg Dec 4, 2024
43ccdfd
negated matchers
emilia-friedberg Dec 4, 2024
b76eedc
Merge branch 'feat/update-evidence-cms-to-support-activity-types' of …
emilia-friedberg Dec 4, 2024
aee56b9
fix test failures
emilia-friedberg Dec 4, 2024
8c1a8a3
fix lint error
emilia-friedberg Dec 4, 2024
a16996c
backend tests
emilia-friedberg Dec 4, 2024
6561521
minor fixes
emilia-friedberg Dec 4, 2024
bf1490b
clean up
emilia-friedberg Dec 4, 2024
a20b3af
merge develop
emilia-friedberg Dec 5, 2024
ef281de
thomas' suggestions
emilia-friedberg Dec 5, 2024
edb58be
remove extra whitespace
emilia-friedberg Dec 5, 2024
cda38d9
brendan suggestion
emilia-friedberg Dec 5, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const DARK = 'dark'
const LIGHT = 'light'

interface checkboxProps {
label: string;
label?: string;
mode?: string;
onClick?: () => void;
state?: string;
Expand Down Expand Up @@ -61,7 +61,7 @@ export const Checkbox = ({ label, mode=LIGHT, onClick, state, selected, id, }: c
return (
<div className="checkbox-container">
{renderCheckbox()}
<label className={labelClass} htmlFor={checkboxId}>{label}</label>
{label && <label className={labelClass} htmlFor={checkboxId}>{label}</label>}
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ exports[`UpperFormSection component should render UpperFormSection 1`] = `
"value": "AutoML",
},
Object {
"label": "RAG",
"value": "RAG",
"label": "GenerativeLabel",
"value": "GenerativeLabel",
},
Object {
"label": "GenAI",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ const Activities = ({ location, match }) => {

const dataTableFields = [
{ name: "Activity ID", attribute:"id", width: "80px", rowSectionClassName: 'center-content', headerClassName: 'center-content', isSortable: true, },
{ name: "Type", attribute: "ai_type", width: "60px", noTooltip: true, },
{ name: "Type", attribute: "ai_type", width: "120px", noTooltip: true, },
{ name: "Internal Name", attribute:"notes", width: "250px", isSortable: true, sortAttribute: 'internalNameForSort', },
{ name: "Activity Name", attribute:"title", width: "660px", isSortable: true, sortAttribute: 'activityNameForSort', },
{ name: "Activity Name", attribute:"title", width: "600px", isSortable: true, sortAttribute: 'activityNameForSort', headerClassName: 'grow-to-fit', rowSectionClassName: 'grow-to-fit' },
{ name: "Highlight Validation", attribute:"valid_highlights", width: "60px", noTooltip: true, rowSectionClassName: 'center-content', headerClassName: 'center-content' }
];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ActivateLLMPromptModal renders modal with confirmation message 1`] = `
<DocumentFragment>
<div
class="modal-container activate-prompt-modal-container"
>
<div
class="modal-background"
/>
<div
class="activate-prompt-modal quill-modal modal-body"
>
<div
class="top-section"
>
<p>
Activating this prompt will make Trial Prompt 123 the Because Prompt for Test Activity.
<br />
<br />
Are you sure you want to activate Trial Prompt 123?
<br />
<br />
Note: You cannot undo this action. You can only replace the prompt with a different Trial Prompt.
</p>
</div>
<div
class="button-section"
>
<button
class="quill-button medium outlined focus-on-light"
type="button"
>
Cancel
</button>
<button
class="quill-button medium contained focus-on-light"
type="button"
>
Yes
</button>
</div>
</div>
</div>
</DocumentFragment>
`;

exports[`ActivateLLMPromptModal shows correct message if activeActivatedLLMPrompt is provided 1`] = `
<DocumentFragment>
<div
class="modal-container activate-prompt-modal-container"
>
<div
class="modal-background"
/>
<div
class="activate-prompt-modal quill-modal modal-body"
>
<div
class="top-section"
>
<p>
The Because Prompt for Test Activity is currently Trial Prompt 111.
<br />
<br />
Activating this prompt will replace Trial Prompt 111 with Trial Prompt 123.
<br />
<br />
Are you sure you want to make Trial Prompt 123 the Because Prompt?
</p>
</div>
<div
class="button-section"
>
<button
class="quill-button medium outlined focus-on-light"
type="button"
>
Cancel
</button>
<button
class="quill-button medium contained focus-on-light"
type="button"
>
Yes
</button>
</div>
</div>
</div>
</DocumentFragment>
`;

exports[`ActivateLLMPromptModal shows note input and save button after confirmation 1`] = `
<DocumentFragment>
<div
class="modal-container activate-prompt-modal-container"
>
<div
class="modal-background"
/>
<div
class="activate-prompt-modal quill-modal modal-body"
>
<div
class="top-section"
>
<p>
Please confirm that the following information is correct:
<br />
<br />
Because Prompt for Test Activity: Trial Prompt 123
</p>
<div
class="textarea-wrapper"
>
<div
class="input-container textfield-container inactive undefined"
>
<label
for="notes"
>
Add Activation Notes
</label>
<textarea
id="notes"
maxlength="10000"
/>
</div>
</div>
</div>
<div
class="button-section"
>
<button
class="quill-button medium outlined focus-on-light"
type="button"
>
Cancel
</button>
<button
class="quill-button medium contained focus-on-light"
type="button"
>
Save & Activate
</button>
</div>
</div>
</div>
</DocumentFragment>
`;
Loading
Loading