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

Share button [1/n]: Create button UI #1031

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Share button [1/n]: Create button UI #1031

merged 1 commit into from
Jan 26, 2024

Conversation

rossdanlm
Copy link
Contributor

@rossdanlm rossdanlm commented Jan 25, 2024

Share button [1/n]: Create button UI

Doesn't do anything when you click it now, but just setting up the UI and tooltip. Will add upload feature next PR

Test Plan

Run these commands from the aiconfig dir:

aiconfig_path  =./cookbooks/Gradio/huggingface.aiconfig.json
parsers_path=./cookbooks/Gradio/hf_model_parsers.py
aiconfig edit --aiconfig-path=$aiconfig_path --server-port=8080 --server-mode=debug_servers --parsers-module-path=$parsers_path
Screenshot 2024-01-25 at 15 58 42

Stack created with Sapling. Best reviewed with ReviewStack.

Doesn't do anything when you click it now, but just setting up the UI and tooltip. Will add upload feature next PR

## Test Plan
Run these commands from the `aiconfig` dir:
```bash
aiconfig_path  =./cookbooks/Gradio/huggingface.aiconfig.json
parsers_path=./cookbooks/Gradio/hf_model_parsers.py
aiconfig edit --aiconfig-path=$aiconfig_path --server-port=8080 --server-mode=debug_servers --parsers-module-path=$parsers_path
```

<img width="1512" alt="Screenshot 2024-01-25 at 15 58 42" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/6f414df7-dcf3-4b58-beed-c4fc3f7c2968">
@@ -940,6 +940,20 @@ export default function AIConfigEditor({
<Container maw="80rem">
<Flex justify="flex-end" mt="md" mb="xs">
<Group>
{/* TODO: Remove false gating below once Share button is ready */}
{false && !readOnly && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also make this predicated on a 'getShareLink' callback existing so that we only show this in gradio (where we can pass through the function implementation that calls gradio backend)

Copy link
Contributor

Choose a reason for hiding this comment

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

Can be done in later PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so that we only show this in gradio
I was thinking of just using MODE, but yea this works too

Let's also make this predicated on a 'getShareLink' callback existing
Yea I have this planned for a future PR

@rossdanlm rossdanlm merged commit 6f53133 into main Jan 26, 2024
2 checks passed
rossdanlm added a commit that referenced this pull request Jan 26, 2024
…#1032)

Move !readOnly check to entire header grouping at top for all buttons


Doing this makes it easier to manage rather than gating each one
individually

## Test Plan
No functional changes

ReadOnly mode

<img width="1512" alt="Screenshot 2024-01-25 at 16 03 30"
src="https://github.com/lastmile-ai/aiconfig/assets/151060367/3493b525-e943-46fe-805d-3424af206bae">


Regular mode (with share button shown)

<img width="1512" alt="Screenshot 2024-01-25 at 16 04 06"
src="https://github.com/lastmile-ai/aiconfig/assets/151060367/fc7a86c2-8efb-4190-afe9-870a15e93f46">

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1032).
* #1037
* #1035
* __->__ #1032
* #1031
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.

2 participants