Skip to content

Commit

Permalink
fix: made breadcrumbs break over multiple lines if needed
Browse files Browse the repository at this point in the history
This isn't the prettiest thing, but it's temporary until we set up
full-on ellipsis shortening.
  • Loading branch information
arctic-hen7 committed Jan 12, 2022
1 parent e9e19a6 commit 93a195b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/tribble-app/src/templates/workflow/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,15 +640,15 @@ fn history_breadcrumbs() -> View<G> {
view! {
button(
on:click = click_handler,
class = "p-0.5 xs:p-1 text-neutral-500 hover:text-black transition-colors duration-200 rounded-md",
class = "p-0.5 xs:p-1 text-neutral-500 hover:text-black transition-colors duration-200 rounded-md text-left",
) { (display_name) }
}
};
view! {
li(class = "mx-1") {
li(class = "mx-1 text-left") {
(item_contents)
}
// If this isn't hte last element, add a separator
// If this isn't the last element, add a separator
(if i == history_len {
View::empty()
} else {
Expand All @@ -668,10 +668,10 @@ fn history_breadcrumbs() -> View<G> {
}));

view! {
// BUG This can be ugly with very long section names, it's be nicer if all the text just flowed fully
nav(aria-live = "assertive") {
// We center vertically so that the text separators stay in line with the button padding
ol(class = "w-full flex items-center text-sm") {
// TODO Compress this to the first and last with dots based on screen size
ol(class = "w-full flex flex-wrap items-center text-sm text-left") {
(*sections_list.get())
}
}
Expand Down

0 comments on commit 93a195b

Please sign in to comment.