Skip to content

Conversation

@aldenhallak
Copy link
Collaborator

@aldenhallak aldenhallak commented Nov 24, 2025

Description

We can now create templates in the experiment stages component. We can see and load those templates as well.

Add.user.templates.webm

Verification

  • Screenshots or videos included (if applicable)
  • Clear reproduction steps provided to invoke the feature (if applicable)
  • All tests pass (if applicable)

Related issues

This PR fixes: #870

It’s recommended to open an issue for discussion before submitting a PR.


@aldenhallak aldenhallak requested a review from cjqian November 24, 2025 19:03
@cjqian
Copy link
Member

cjqian commented Nov 24, 2025

I'm cracking up at the templates made in the demo video. 😆

One UI ask: the buttons should not sit in the stage header:
image

I'm inspired by this in Google Docs:
image

That is, "Save as experiment" but "Save as template" on dropdown? Then update to the left of the "Save as experiment" button?

1. In the experiment builder, click the **Load template** button in the left sidebar.
2. Browse the gallery of available templates.
* **Built-in Templates**: Pre-defined templates included with Deliberate Lab.
* **Saved Templates**: Templates you or your team have created and saved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"your team have created and saved" -> You can't share templates with other experimenters currently, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All templates are public as of now

${this.experimentEditor.savedTemplates.length > 0
? html`
<div class="gallery-section">
<div class="gallery-title">Saved Templates</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Your Saved Templates" to be more explicit?

`
: nothing}
<div class="gallery-section">
<div class="gallery-title">Pre-defined Templates</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "Global Templates" or something to indicate that these are shared?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're all shared, but can change that if desired.

@vivtsai
Copy link
Collaborator

vivtsai commented Nov 25, 2025

@aldenhallak FYI, the current experiment endpoint leaves potential support for experiment templates (in that you can specify saving to a templates collection). If you're not planning on using this path, perhaps clean it up and/or alter any documentation?

https://github.com/PAIR-code/deliberate-lab/blob/main/functions/src/experiment.endpoints.ts#L27

@aldenhallak
Copy link
Collaborator Author

Experiments.webm
Updated UI - @cjqian

@cjqian
Copy link
Member

cjqian commented Dec 2, 2025

  1. Make sure color settings are consistent for the pop-up?
image
  1. Add a tooltip to "Save as template" to warn that this will be a template will be shared with all experimenters for now. Or alternatively, see 3!

  2. As a follow-up, we should add a checkbox in the Save as Template pop-up that toggles "Make template sharable" . If checked, sharing a link to the template (?) will allow other experimenters with the link to access the template.

@aldenhallak
Copy link
Collaborator Author

Done 1 and 2 -- should we do 3 in this PR? I feel like we need to explore a good template discovery method. @cjqian

@aldenhallak
Copy link
Collaborator Author

Here's how two different experimenters can use templates together

Multiple.experimenters.vibe.webm

@cjqian
Copy link
Member

cjqian commented Dec 3, 2025

Add checkbox for "Make template globally public"

s/ public / sharable while you're at it!

@aldenhallak
Copy link
Collaborator Author

Sharing.experiments.1.webm

I didn't s/public/sharable because there's now a difference between public and sharable. LMK what you think! @cjqian

@aldenhallak
Copy link
Collaborator Author

image Different from the video -- changed "share" to "modify sharing settings"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to save and modify experiments in the frontend.

3 participants