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

[editor] Add MantineProvider to Unblock Styling Work #640

Merged
merged 3 commits into from
Dec 27, 2023
Merged

Conversation

rholinshead
Copy link
Contributor

@rholinshead rholinshead commented Dec 27, 2023

[editor] Add MantineProvider to Unblock Styling Work

Adding the MantineProvider around the editor to allow customizing theme/styles from the root component. This will allow differentiation between local editor and gradio

Testing:

  • Load editor without issue
  • Temporarily set theme={{primaryColor: "red"}} and see the correct changes

Stack created with Sapling. Best reviewed with ReviewStack.

Ryan Holinshead added 3 commits December 27, 2023 11:27
# [editor] Prompt Output Bar

Placeholder/starting point for the Output bar. In the future, we'll add metrics such as token usage to this component.

<img width="998" alt="Screenshot 2023-12-27 at 11 26 16 AM" src="https://github.com/lastmile-ai/aiconfig/assets/5060851/29af67cc-9856-4b57-a7b5-74e0693c5089">
# [editor] Run Prompt Button UI

Adding the Run prompt button to the UI; will connect the callbacks/server request in subsequent PR

<img width="1061" alt="Screenshot 2023-12-27 at 11 28 23 AM" src="https://github.com/lastmile-ai/aiconfig/assets/5060851/4bf00f65-8983-4353-8e4d-020cca8840ca">
<img width="1050" alt="Screenshot 2023-12-27 at 11 28 31 AM" src="https://github.com/lastmile-ai/aiconfig/assets/5060851/56f64064-1333-43e0-b666-eb2c616991ab">
@rossdanlm
Copy link
Contributor

Looks interesting! Can you show screenshot and/or video in diff summary/comments?

@rholinshead
Copy link
Contributor Author

rholinshead commented Dec 27, 2023

Looks interesting! Can you show screenshot and/or video in diff summary/comments?

As-is this has no implications / changes to the UI. It will let us set global theme/styles for our UI/style pass through.

For example, we can set the primary color (applied to buttons, highlighting, etc.) to match figma with:

  const primaryColor = "#FF1CF7";

  return (
    <div>
      <MantineProvider
        withGlobalStyles
        withNormalizeCSS
        theme={{
          colors: {
            primaryColor: [
              // Must be an array of size 10 statically-defined colours for different shades
              primaryColor, // TODO: Change for highlighting
              primaryColor,
              primaryColor,
              primaryColor,
              primaryColor,
              primaryColor,
              primaryColor,
              primaryColor,
              primaryColor,
              primaryColor,
            ],
          },
          primaryColor: "primaryColor",
        }}
      >

and get:
Screenshot 2023-12-27 at 12 08 55 PM

@rholinshead rholinshead merged commit ea91e27 into main Dec 27, 2023
1 check passed
@rossdanlm rossdanlm deleted the pr640 branch December 29, 2023 15:20
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.

3 participants