Skip to content

Commit

Permalink
fix: Tooltips point in wrong direction#11935 (argoproj#12578)
Browse files Browse the repository at this point in the history
* fix: Tooltips point in wrong direction#11935

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>

* fix: Tooltips point in wrong direction#11935

Signed-off-by: Teng <yilin.teng@fmr.com>

---------

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>
Signed-off-by: Teng <yilin.teng@fmr.com>
Co-authored-by: Teng, Jessie <a715260@fmr.com>
  • Loading branch information
JessieTeng89 and Teng, Jessie authored Dec 1, 2023
1 parent 19fa5b9 commit 8656585
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ui/src/app/sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ $deselected-text: #818d94;
text-overflow: ellipsis;
}

&__tooltip {
max-width: 300px;
@media screen and (max-width: 590px) {
max-width: 250px;
}
}

&__nav-item {
cursor: pointer;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const Sidebar = (props: SidebarProps) => {
</div>

{(props.navItems || []).map(item => (
<Tooltip key={item.path} content={item?.tooltip || item.title} {...tooltipProps}>
<Tooltip key={item.path} content={<div className='sidebar__tooltip'>{item?.tooltip || item.title}</div>} {...tooltipProps}>
<div
key={item.title}
className={`sidebar__nav-item ${locationPath === item.path || locationPath.startsWith(`${item.path}/`) ? 'sidebar__nav-item--active' : ''}`}
Expand Down

0 comments on commit 8656585

Please sign in to comment.