-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: Overflow tabs list view #34150
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4f2ef49
feat: New ui for overflow tabs
albinAppsmith 4eec56e
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith 3031920
fix: new tab click fix
albinAppsmith 914614d
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith 1a499f3
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith f98571d
fix: optmised editortab component
albinAppsmith 22b2dfb
chore: Optimisations
albinAppsmith 000cde8
removed refs
albinAppsmith ad3f4e7
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith d31c64f
fix: seperated add button and tab
albinAppsmith 8b98201
added border for sticky button
albinAppsmith e14a985
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith c1d0795
added missing dependency
albinAppsmith f89cecc
fix: removed scrollbar defer
albinAppsmith 2703067
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith 77611ad
fix: show list issues
albinAppsmith 7d07044
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith 43b8219
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith 296c976
fix: cypress failures
albinAppsmith 1c829af
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
albinAppsmith fb8addb
fix: jest test fix
albinAppsmith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| import React from "react"; | ||
| import styled from "styled-components"; | ||
| import clsx from "classnames"; | ||
|
|
||
| import { Flex, Icon } from "design-system"; | ||
| import { sanitizeString } from "utils/URLUtils"; | ||
|
|
||
| interface FileTabProps { | ||
| isActive: boolean; | ||
| title: string; | ||
| onClick: () => void; | ||
| onClose: (e: React.MouseEvent) => void; | ||
| icon?: React.ReactNode; | ||
| } | ||
|
|
||
| export const StyledTab = styled(Flex)` | ||
| position: relative; | ||
| height: 100%; | ||
| font-size: 12px; | ||
| color: var(--ads-v2-colors-text-default); | ||
| cursor: pointer; | ||
| gap: var(--ads-v2-spaces-2); | ||
| border-top: 1px solid transparent; | ||
| border-top-left-radius: var(--ads-v2-border-radius); | ||
| border-top-right-radius: var(--ads-v2-border-radius); | ||
| align-items: center; | ||
| justify-content: center; | ||
| padding: var(--ads-v2-spaces-3); | ||
| border-left: 1px solid transparent; | ||
| border-right: 1px solid transparent; | ||
| border-top: 2px solid transparent; | ||
|
|
||
| &.active { | ||
| background: var(--ads-v2-colors-control-field-default-bg); | ||
| border-top-color: var(--ads-v2-color-bg-brand); | ||
| border-left-color: var(--ads-v2-color-border-muted); | ||
| border-right-color: var(--ads-v2-color-border-muted); | ||
| } | ||
|
|
||
| & > .tab-close { | ||
| position: relative; | ||
| right: -2px; | ||
| visibility: hidden; | ||
| } | ||
|
|
||
| &:hover > .tab-close { | ||
| visibility: visible; | ||
| } | ||
|
|
||
| &.active > .tab-close { | ||
| visibility: visible; | ||
| } | ||
| `; | ||
|
|
||
| export const TabTextContainer = styled.span` | ||
| width: 100%; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| `; | ||
|
|
||
| export const TabIconContainer = styled.div` | ||
| height: 12px; | ||
| width: 12px; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| flex-shrink: 0; | ||
| img { | ||
| width: 12px; | ||
| } | ||
| `; | ||
|
|
||
| export const FileTab = ({ | ||
| icon, | ||
| isActive, | ||
| onClick, | ||
| onClose, | ||
| title, | ||
| }: FileTabProps) => { | ||
| return ( | ||
| <StyledTab | ||
| className={clsx("editor-tab", isActive && "active")} | ||
| data-testid={`t--ide-tab-${sanitizeString(title)}`} | ||
| onClick={onClick} | ||
| > | ||
| {icon ? <TabIconContainer>{icon}</TabIconContainer> : null} | ||
| <TabTextContainer>{title}</TabTextContainer> | ||
| {/* not using button component because of the size not matching design */} | ||
| <Icon | ||
| className="tab-close rounded-[4px] hover:bg-[var(--ads-v2-colors-action-tertiary-surface-hover-bg)] cursor-pointer p-[2px]" | ||
| data-testid="t--tab-close-btn" | ||
| name="close-line" | ||
| onClick={onClose} | ||
| /> | ||
| </StyledTab> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.