-
Notifications
You must be signed in to change notification settings - Fork 80
UI fixes #995
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
UI fixes #995
Changes from 2 commits
3853ce6
1424946
e1c52bc
afe8a97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -245,8 +245,11 @@ | |
| white-space: nowrap; | ||
| } | ||
|
|
||
|
|
||
| /* font_transition: */ | ||
|
|
||
| .landing-page .tabs-header .nav-tabs .nav-link:hover { | ||
| background: var(--hover-bg); | ||
| background: var(--baby-blue-300); | ||
| color: var(--color-white); | ||
| border-color: var(--baby-blue-500); | ||
| } | ||
|
|
@@ -303,10 +306,12 @@ | |
| margin-bottom: var(--spacing-md); | ||
| } | ||
|
|
||
|
|
||
| /* UI-fixez: use background-color instead of color property */ | ||
|
||
|
|
||
| .landing-page .section-bordered { | ||
| background: transparent; | ||
| border: none; | ||
| color: var(--color-topbar-bg); | ||
| background-color: var(--color-topbar-bg); | ||
| border-radius: var(--landing-radius-md); | ||
| padding: var(--spacing-lg); | ||
| margin-top: var(--spacing-lg); | ||
|
|
@@ -344,10 +349,13 @@ | |
| text-align: center; | ||
| } | ||
|
|
||
|
|
||
| /* UI-fixez: use defined token --border-radius-md */ | ||
|
|
||
| .landing-page .feature-image { | ||
| max-width: 100%; | ||
| height: auto; | ||
| border-radius: var(--border-radius); | ||
| border-radius: var(--border-radius-md); | ||
| border: 1px solid var(--color-border); | ||
| } | ||
|
|
||
|
|
@@ -822,10 +830,14 @@ | |
| align-self: center; | ||
| } | ||
|
|
||
|
|
||
| /* UI-fixez: Changed arrow to solid white using CSS filter */ | ||
|
|
||
| .landing-page .arrow-image { | ||
| width: 80px; | ||
| height: auto; | ||
| opacity: 0.8; | ||
| opacity: 1; | ||
| filter: brightness(0) invert(1); | ||
| } | ||
|
|
||
|
|
||
|
|
@@ -857,9 +869,11 @@ | |
| padding: var(--landing-spacing-s-10) 0; | ||
| min-width: auto; | ||
| } | ||
| /* UI-fixez: Mobile arrow also solid white */ | ||
| .landing-page .arrow-image { | ||
| transform: rotate(90deg); | ||
| width: 60px; | ||
| filter: brightness(0) invert(1); | ||
| } | ||
| .landing-page .before-image-container .image-caption, | ||
| .landing-page .after-image-container .image-caption { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -362,6 +362,47 @@ a.sidebar-section-text { | |
| } | ||
|
|
||
|
|
||
| /* ============================================================================ | ||
| UI-fixez: Filter Pill Styles for Active Search State | ||
|
|
||
| This section implements dynamic pill coloring: | ||
| - Grey pills by default when repos/orgs are selected | ||
| - Blue pills (like Data Ready badge) when search is executing | ||
|
|
||
| The .searching class is toggled by a callback in index_callbacks.py | ||
| ============================================================================ */ | ||
|
|
||
|
|
||
| /* Style for filter pills (grey by default when selected) */ | ||
|
|
||
| .mantine-MultiSelect-pill, | ||
|
||
| .mantine-MultiSelect-value { | ||
| background-color: var(--gray-medium); | ||
| color: var(--color-white); | ||
| } | ||
|
|
||
| .searchbar-dropdown .mantine-MultiSelect-pill, | ||
| .searchbar-dropdown .mantine-MultiSelect-value { | ||
| background-color: var(--gray-medium); | ||
| color: var(--color-white); | ||
| } | ||
|
|
||
|
|
||
| /* Style for filter pills when search is active */ | ||
|
|
||
|
|
||
| /* !important needed to override inline styles from Mantine components */ | ||
|
|
||
| .searchbar-dropdown.searching .mantine-MultiSelect-pill, | ||
| .searchbar-dropdown.searching .mantine-MultiSelect-value { | ||
| background-color: var(--baby-blue-700) !important; | ||
| color: var(--color-white) !important; | ||
| } | ||
|
|
||
|
|
||
| /* End UI-fixez pill styles */ | ||
|
|
||
|
|
||
| /* visualization adjustments */ | ||
|
|
||
| .visualization-row { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| from datetime import datetime, timedelta | ||
|
Check warning on line 1 in 8Knot/pages/index/index_callbacks.py
|
||
| import re | ||
| import os | ||
| import time | ||
|
|
@@ -8,7 +8,7 @@ | |
| import dash_bootstrap_components as dbc | ||
| import dash | ||
| from dash import callback, html | ||
| from dash.dependencies import Input, Output, State, MATCH | ||
|
Check warning on line 11 in 8Knot/pages/index/index_callbacks.py
|
||
| from app import augur | ||
| from flask_login import current_user | ||
| from cache_manager.cache_manager import CacheManager as cm | ||
|
|
@@ -33,7 +33,7 @@ | |
| from queries.repo_info_query import repo_info_query as riq | ||
| from models import SearchItem | ||
| import redis | ||
| import flask | ||
|
Check warning on line 36 in 8Knot/pages/index/index_callbacks.py
|
||
| from .search_utils import fuzzy_search | ||
| from .search_utils import clean_repo_name | ||
|
|
||
|
|
@@ -80,7 +80,7 @@ | |
| # TODO: check how old groups are. If they're pretty old (threshold tbd) then requery | ||
|
|
||
| # check if groups are not already cached, or if the refresh-button was pressed | ||
| if not users_cache.exists(f"{user_id}_groups") or (dash.ctx.triggered_id == "refresh-button"): | ||
|
Check warning on line 83 in 8Knot/pages/index/index_callbacks.py
|
||
| # kick off celery task to collect groups | ||
| # on query worker queue, | ||
| return [ugq.apply_async(args=[user_id], queue="data").id] | ||
|
|
@@ -423,7 +423,7 @@ | |
| elif search_item == SearchItem.REPO: | ||
| formatted_v["label"] = f"repo: {v['label']}" | ||
| default_options.append(formatted_v) | ||
| except: | ||
|
Check warning on line 426 in 8Knot/pages/index/index_callbacks.py
|
||
| # If that fails, just return the raw selection values | ||
| default_options = [{"value": v, "label": f"ID: {v}"} for v in selections] | ||
|
|
||
|
|
@@ -788,7 +788,7 @@ | |
| ctx = dash.callback_context | ||
|
|
||
| # Check which input triggered the callback | ||
| if ctx.triggered_id == "sidebar-toggle" and n_clicks: | ||
|
Check warning on line 791 in 8Knot/pages/index/index_callbacks.py
|
||
| # Manual toggle - simply toggle the collapse state | ||
| return not is_open | ||
| elif ctx.triggered_id == "url": | ||
|
|
@@ -851,7 +851,7 @@ | |
| ) | ||
| def hide_loading_on_landing(pathname): | ||
| """Hide loading components when on landing page.""" | ||
| if pathname == "/" or pathname is None: | ||
|
Check warning on line 854 in 8Knot/pages/index/index_callbacks.py
|
||
| # Hide loading components on landing page | ||
| return {"display": "none"}, {"display": "none"} | ||
| else: | ||
|
|
@@ -860,3 +860,41 @@ | |
|
|
||
|
|
||
| # Note: Landing page callbacks moved to pages/landing/landing_callbacks.py | ||
|
|
||
|
|
||
| # ============================================================================ | ||
| # UI-fixez: Callback to change pill color when search is clicked | ||
| # | ||
| # This callback implements dynamic pill coloring: | ||
| # - When user selects repos/orgs: pills are grey (pending) | ||
| # - When user clicks search icon: pills turn blue (active search) | ||
| # - Default selection (chaoss) starts blue since search is auto-triggered | ||
| # | ||
| # Works in conjunction with CSS in main_layout.css | ||
| # ============================================================================ | ||
| @callback( | ||
| Output("projects", "className"), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please make these variables descriptive to our codebase |
||
| [Input("search", "n_clicks"), Input("projects", "value")], | ||
| prevent_initial_call=True, | ||
| ) | ||
| def update_pill_color_on_search(search_clicks, selected_values): | ||
| """Update pill color based on search action. | ||
|
|
||
| When search icon is clicked, add 'searching' class to turn pills blue. | ||
| When values change (user is selecting), remove 'searching' class to keep pills grey. | ||
| """ | ||
| if not dash.ctx.triggered: | ||
| return dash.no_update | ||
|
|
||
| triggered_id = dash.ctx.triggered_id | ||
|
|
||
| if triggered_id == "search": | ||
EngCaioFonseca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Search button clicked - add 'searching' class to turn pills blue | ||
| logging.info(f"PILL COLOR: Search clicked - turning pills BLUE") | ||
| return "searchbar-dropdown searching" | ||
| if triggered_id == "projects": | ||
| # Values changed (user selecting) - remove 'searching' class to keep pills grey | ||
| logging.info(f"PILL COLOR: Values changed - turning pills GREY. Selected: {selected_values}") | ||
| return "searchbar-dropdown" | ||
|
|
||
| return dash.no_update | ||
EngCaioFonseca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from dash import html, dcc | ||
| import dash | ||
| import dash_bootstrap_components as dbc | ||
| import dash_mantine_components as dmc | ||
| from app import augur | ||
|
|
@@ -213,7 +213,8 @@ | |
| debounce=100, # debounce time for the search input, since we're implementing client-side caching, we can use a faster debounce | ||
| data=[augur.initial_multiselect_option()], | ||
| value=[augur.initial_multiselect_option()["value"]], | ||
| className="searchbar-dropdown", | ||
| # UI-fixez: Start with "searching" class so default selection (chaoss) shows as blue | ||
|
||
| className="searchbar-dropdown searching", | ||
| styles={ | ||
| "input": { | ||
| "fontSize": "16px", | ||
|
|
@@ -239,6 +240,15 @@ | |
| "margin": "2px 4px", | ||
| "color": "white", | ||
| }, | ||
| # UI-fixez: Inline styles for grey pill default color | ||
| "value": { | ||
| "backgroundColor": "#555555", | ||
| "color": "white", | ||
| }, | ||
| "pill": { | ||
| "backgroundColor": "#555555", | ||
| "color": "white", | ||
| }, | ||
| }, | ||
| ), | ||
| dbc.Button( | ||
|
|
@@ -266,10 +276,12 @@ | |
| style={"position": "relative"}, | ||
| ), | ||
| dbc.Alert( | ||
| # UI-fixez: Updated help text to explain pill color behavior | ||
| children='Please ensure that your spelling is correct. \ | ||
| If your selection definitely isn\'t present, please request that \ | ||
| it be loaded using the help button "REPO/ORG Request" \ | ||
| in the bottom right corner of the screen.', | ||
| in the bottom right corner of the screen. \ | ||
| The search is only confirmed when you click the search icon and the pill turns blue.', | ||
| id="help-alert", | ||
| dismissable=True, | ||
| fade=True, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for the other PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partially. The color of the tabs to baby-blue was going to be implemented in that PR (Font transitions), but then, I thought It'd be best to implement it here since this is about UI fixes anyways.
So, basically, the implementation about the colors changing the tabs are right, just the comment is not, which I'll change.