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

[PoC] Show styling examples #75

Closed
wants to merge 2 commits into from
Closed

[PoC] Show styling examples #75

wants to merge 2 commits into from

Conversation

kideh88
Copy link
Collaborator

@kideh88 kideh88 commented Nov 22, 2024

This repository is public. Do not put any private DataRobot or customer data: code, datasets, model artifacts, .etc.

Rationale

What is this pull request for?

Summary of Changes

In general, what was changed? Screenshots are welcome too!

Comment on lines +231 to +232
div[data-testid="stModal"] > div > div {
background-color: red; // If the modals should have a different background color, set it here
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: Here you can set dialog background color

Choose a reason for hiding this comment

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

@shu echoing what Kim said. I just copied in and set to white :)

if col1.button(I18N_SHARE_BUTTON, key='share-button'):
show_share_dialog(app_url)
with sal.image('centered-image'):
st.image(APP_LOGO) # Set path of the company image to show centered
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: Here you can set the image path

@@ -3,6 +3,7 @@ gatherUsageStats = false

[theme]
base="dark"
textColor="#ffffff" # Set general text color (which appears outside of chat messages in dialogs etc)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Set the text color for the whole app (titles, texts outside chat)

@@ -1,5 +1,6 @@
$chat-message-background-color: var(--st-secondary-background-color);
$chat-message-footer-border: 1px solid rgba(250, 250, 250, 0.2);
$chat-message-text-color: #00ff00; // Set the text color for the chat messages here!
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: Set the text color for the chat messages here!

@@ -152,6 +156,21 @@
}
}

%centered-image {

Choose a reason for hiding this comment

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

@shu this part is needed to let you adds an image to the center of a div. I use it in components

@@ -213,6 +242,7 @@ $custom-classes: (
sal-columns: (chat-message-footer, no-flex-grow),
sal-button: (share-button, citation-button, feedback-button, feedback-up-icon, feedback-down-icon, feedback-up-icon-active, feedback-down-icon-active),
sal-button-container: (dialog-button),
sal-image-container: (centered-image),

Choose a reason for hiding this comment

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

@shu this part is needed so that sal-image-container is callable via with sal.image("centered-image"):

if col1.button(I18N_SHARE_BUTTON, key='share-button'):
show_share_dialog(app_url)
with sal.image('centered-image'):
st.image(APP_LOGO) # Set path of the company image to show centered above the chat messages

Choose a reason for hiding this comment

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

@shu this renders the app logo in the center of a div or streamlit part. I just copied this into the part where the diaglogue modal appears

@kideh88 kideh88 closed this Jan 2, 2025
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