-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: horizontal scroll for big conditions #207
Conversation
1cd9ed7
to
552a695
Compare
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.
partial review
@@ -86,3 +87,12 @@ | |||
.min-w-48 { |
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.
we can use tailwind config file to add such requirements
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.
pending
@@ -27,6 +27,7 @@ | |||
|
|||
.context_condition{ |
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.
can we not move these to tailwind itself ?
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.
pending
class:text-gray-300={striked} | ||
>{key}</span> | ||
</td> | ||
<td class="min-w-48 max-w-72 font-mono" style="word-break: break-word;"> |
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.
can we keep all styles in one single format, (preferably all in tailwind - break-words
for this case)
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.
I mostly just moved the code out of that big component function this just an old code when we were building the first cut for UI and never it touched it again, but sure I will make the change since we already made a class for that style.
@ShubhranshuSanjeev few issues I saw in my testing
|
About the smaller screen, I have tested it on my side already it handles that, the table becomes horizontally scrollable, and there is no overflow of content. |
Yes that is given its an |
Sure, will change to pointer. |
Also for screens smaller than normal laptops the table and the conditions will be vertically arranged. |
1834df8
to
b24728b
Compare
6ca353c
to
41073fc
Compare
@@ -36,7 +36,7 @@ pub fn Layout(children: Children) -> impl IntoView { | |||
<div> | |||
<SideNav resolved_path=path original_path=original_path.to_string()/> | |||
// params_map=params_map | |||
<main class="ease-soft-in-out xl:ml-96 relative h-full max-h-screen rounded-xl transition-all duration-200 overflow-y-auto"> | |||
<main class="ease-soft-in-out xl:ml-[350px] relative h-full max-h-screen rounded-xl transition-all duration-200 overflow-y-auto"> |
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.
Would rem and em instead of px be better?
#[prop(into, default = String::new())] cell_style: String, | ||
#[prop(into, default = String::new())] style: String, | ||
#[prop(into, default = String::new())] head_style: String, |
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.
Can we have some reasonable defaults or is empty string fine?
b24728b
to
6d0d6fa
Compare
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.
Remaining: Disabling actions on experiment's context.
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.
minor suggestions and few other changes
@@ -37,37 +45,41 @@ pub fn context_card( | |||
]; | |||
|
|||
view! { | |||
<div class="rounded-lg shadow bg-base-100 p-6 shadow"> | |||
<div class="rounded-lg shadow bg-base-100 p-6 shadow flex flex-col gap-4"> |
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.
preferred order for classes:
"custom-non-tailwind classes"
"hidden"
"position z top/left/.."
"h w"
"m"
"p"
"flex props"
"text props"
"bg props"
"border props/rounded"
"shadow"
"transition/animation"
let TablePaginationProps { current_page, total_pages, on_prev, on_next, .. } = pagination_props | ||
.get_value(); | ||
view! { | ||
<div class="mt-2 flex justify-end"> |
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.
can we pass these class styles to the Component itself?
redundant div, wrapping only one child
class:text-gray-300={striked} | ||
>{key}</span> | ||
</td> | ||
<td class="min-w-48 max-w-72 font-mono" style="word-break: break-word;"> |
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.
<td class="min-w-48 max-w-72 font-mono" style="word-break: break-word;"> | |
<td class="min-w-48 max-w-72 font-mono break-words"> |
id=context.id.clone() | ||
class="xl:w-[400px] h-fit" | ||
/> | ||
<div class="overflow-auto pt-5"> |
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.
can we pass these props to the table itself ?
.collect::<Vec<_>>() | ||
} | ||
</ConditionCollapseProvider> | ||
<div class="card bg-base-100 shadow m-6"> |
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.
same, can we pass these props to the following div
@@ -86,3 +87,12 @@ | |||
.min-w-48 { |
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.
pending
@@ -27,6 +27,7 @@ | |||
|
|||
.context_condition{ |
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.
pending
3fde839
to
6a32724
Compare
changes requested have been addressed
Problem
Conditions on Overrides and Resolve page overflowed the screen width forcing to horizontally scroll to check the content.
Solution Screenshots
Default view - content is truncated
Expanded view - on clicking the pills it will expanded to show the wrapped content.