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

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

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

rossdanlm
Copy link
Contributor

@rossdanlm rossdanlm commented Jan 25, 2024

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

Screenshot 2024-01-25 at 16 03 30

Regular mode (with share button shown)

Screenshot 2024-01-25 at 16 04 06

Stack created with Sapling. Best reviewed with ReviewStack.

Rossdan Craig rossdan@lastmileai.dev added 2 commits January 25, 2024 17:42
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">
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">
rossdanlm added a commit that referenced this pull request Jan 26, 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:
```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">

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/1031).
* #1037
* #1035
* #1032
* __->__ #1031
@rossdanlm rossdanlm merged commit f6d7bc9 into main Jan 26, 2024
2 checks passed
@rossdanlm rossdanlm deleted the pr1032 branch January 30, 2024 05:32
rossdanlm pushed a commit that referenced this pull request Jan 30, 2024
I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo

## Test Plan
Rebase onto #1045

Go to `aiconfig/python/src/aiconfig/editor/client` and run this command:
```
rm -rf node_modules && yarn && yarn build
```

Then go to `aiconfig` dir and run this command:
```
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
```

readOnly is true

readOnly is false
rossdanlm pushed a commit that referenced this pull request Jan 30, 2024
I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo

## Test Plan
Rebase onto #1045

Go to `aiconfig/python/src/aiconfig/editor/client` and run this command:
```
rm -rf node_modules && yarn && yarn build
```

Then go to `aiconfig` dir and run this command:
```
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
```

readOnly is true

<img width="1920" alt="Screenshot 2024-01-30 at 00 45 03" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/356cd898-e3f2-430c-8153-a464b78a254b">

readOnly is false

<img width="1920" alt="Screenshot 2024-01-30 at 00 44 36" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/d14ec7ee-8a10-49f1-b9d8-d4a5a2153b99">
rossdanlm pushed a commit that referenced this pull request Jan 30, 2024
I realized that after I moved `readOnly` check on entire group in #1032, I need to be able to still have the Download button for read-only mode so user can still download the AIConfig. We just need to make sure to define this endpoint in the lastMile repo

## Test Plan
Rebase onto #1045

Go to `aiconfig/python/src/aiconfig/editor/client` and run this command:
```
rm -rf node_modules && yarn && yarn build
```

Then go to `aiconfig` dir and run this command:
```
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
```

readOnly is true

<img width="1920" alt="Screenshot 2024-01-30 at 00 45 03" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/356cd898-e3f2-430c-8153-a464b78a254b">

readOnly is false

<img width="1920" alt="Screenshot 2024-01-30 at 00 44 36" src="https://github.com/lastmile-ai/aiconfig/assets/151060367/d14ec7ee-8a10-49f1-b9d8-d4a5a2153b99">
rossdanlm added a commit that referenced this pull request Jan 30, 2024
Download Button [4/n]: Make this enabled for read-only mode




I realized that after I moved `readOnly` check on entire group in
#1032, I need to be able to
still have the Download button for read-only mode so user can still
download the AIConfig. We just need to make sure to define this endpoint
in the lastMile repo

## Test Plan
Rebase onto #1045

Go to `aiconfig/python/src/aiconfig/editor/client` and run this command:
```
rm -rf node_modules && yarn && yarn build
```

Then go to `aiconfig` dir and run this command:
```
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
```

readOnly is true

<img width="1920" alt="Screenshot 2024-01-30 at 00 45 03"
src="https://github.com/lastmile-ai/aiconfig/assets/151060367/356cd898-e3f2-430c-8153-a464b78a254b">

readOnly is false

<img width="1920" alt="Screenshot 2024-01-30 at 00 44 36"
src="https://github.com/lastmile-ai/aiconfig/assets/151060367/d14ec7ee-8a10-49f1-b9d8-d4a5a2153b99">
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.

None yet

2 participants