-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[WEB-2848] refactor: enhance components modularity and introduce new UI componenets #6192
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
17 commits
Select commit
Hold shift + click to select a range
edbb983
feat: add navigation dropdown component
prateekshourya29 1ccbf6a
chore: enhance title/ description loader and componenet modularity
prateekshourya29 6a27815
chore: issue store filter update
prateekshourya29 738f0ec
chore: added few icons to ui package
prateekshourya29 16b9776
chore: improvements for tabs componenet
prateekshourya29 6ee99a2
chore: enhance sidebar modularity
prateekshourya29 34ea342
chore: update issue and router store to add support for additional is…
prateekshourya29 e430730
chore: enhanced cycle componenets modularity
prateekshourya29 abbb15f
feat: added project grouping header for cycles list
prateekshourya29 43c2069
chore: enhanced project dropdown componenet by adding multiple select…
prateekshourya29 fe27e91
chore: enhanced rich text editor modularity by taking members ids as …
prateekshourya29 4340ec8
chore: added functionality to filter disabled layouts in issue-layout…
prateekshourya29 0151d32
chore: added support to pass project ids as props in project card list
prateekshourya29 a57f81a
feat: multi select project modal
prateekshourya29 50988f5
chore: seperate out project componenet for reusability
prateekshourya29 30fa748
chore: command pallete store improvements
prateekshourya29 3e31994
fix: build errors
prateekshourya29 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
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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| export * from "./breadcrumbs"; | ||
| export * from "./navigation-dropdown"; |
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,96 @@ | ||
| "use client"; | ||
|
|
||
| import * as React from "react"; | ||
| import { CheckIcon, ChevronDownIcon } from "lucide-react"; | ||
| // ui | ||
| import { CustomMenu, TContextMenuItem } from "../dropdowns"; | ||
| // helpers | ||
| import { cn } from "../../helpers"; | ||
|
|
||
| type TBreadcrumbNavigationDropdownProps = { | ||
| selectedItemKey: string; | ||
| navigationItems: TContextMenuItem[]; | ||
| navigationDisabled?: boolean; | ||
| }; | ||
|
|
||
| export const BreadcrumbNavigationDropdown = (props: TBreadcrumbNavigationDropdownProps) => { | ||
| const { selectedItemKey, navigationItems, navigationDisabled = false } = props; | ||
| // derived values | ||
| const selectedItem = navigationItems.find((item) => item.key === selectedItemKey); | ||
| const selectedItemIcon = selectedItem?.icon ? ( | ||
| <selectedItem.icon className={cn("size-3.5", selectedItem.iconClassName)} /> | ||
| ) : undefined; | ||
|
|
||
| // if no selected item, return null | ||
| if (!selectedItem) return null; | ||
|
|
||
| const NavigationButton = ({ className }: { className?: string }) => ( | ||
| <li | ||
| className={cn( | ||
| "flex items-center justify-center cursor-default text-sm font-medium text-custom-text-200 group-hover:text-custom-text-100 outline-none", | ||
| className | ||
| )} | ||
| tabIndex={-1} | ||
| > | ||
| {selectedItemIcon && ( | ||
| <div className="flex h-5 w-5 items-center justify-start overflow-hidden">{selectedItemIcon}</div> | ||
| )} | ||
| <div className="relative line-clamp-1 block max-w-[150px] overflow-hidden truncate">{selectedItem.title}</div> | ||
| </li> | ||
| ); | ||
|
|
||
| if (navigationDisabled) { | ||
| return <NavigationButton />; | ||
| } | ||
|
|
||
| return ( | ||
| <CustomMenu | ||
| customButton={ | ||
| <div className="group flex items-center gap-1.5"> | ||
| <NavigationButton className="cursor-pointer" /> | ||
| <ChevronDownIcon className="size-4 text-custom-text-200 group-hover:text-custom-text-100" /> | ||
| </div> | ||
| } | ||
| placement="bottom-start" | ||
| closeOnSelect | ||
| > | ||
| {navigationItems.map((item) => { | ||
| if (item.shouldRender === false) return null; | ||
| return ( | ||
| <CustomMenu.MenuItem | ||
| key={item.key} | ||
| onClick={(e) => { | ||
| e.preventDefault(); | ||
| e.stopPropagation(); | ||
| if (item.key === selectedItemKey) return; | ||
| item.action(); | ||
| }} | ||
prateekshourya29 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| className={cn( | ||
| "flex items-center gap-2", | ||
| { | ||
| "text-custom-text-400": item.disabled, | ||
| }, | ||
| item.className | ||
| )} | ||
| disabled={item.disabled} | ||
| > | ||
| {item.icon && <item.icon className={cn("size-3.5", item.iconClassName)} />} | ||
| <div className="w-full"> | ||
| <h5>{item.title}</h5> | ||
| {item.description && ( | ||
| <p | ||
| className={cn("text-custom-text-300 whitespace-pre-line", { | ||
| "text-custom-text-400": item.disabled, | ||
| })} | ||
| > | ||
| {item.description} | ||
| </p> | ||
| )} | ||
| </div> | ||
| {item.key === selectedItemKey && <CheckIcon className="flex-shrink-0 size-3.5" />} | ||
| </CustomMenu.MenuItem> | ||
| ); | ||
| })} | ||
| </CustomMenu> | ||
| ); | ||
| }; | ||
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,26 @@ | ||
| import * as React from "react"; | ||
|
|
||
| import { ISvgIcons } from "./type"; | ||
|
|
||
| export const LeadIcon: React.FC<ISvgIcons> = ({ className = "text-current", ...rest }) => ( | ||
| <svg className={className} viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest}> | ||
| <path | ||
| d="M0.571533 9C0.571533 4.02944 4.60097 0 9.57153 0C14.5421 0 18.5715 4.02944 18.5715 9C18.5715 13.9706 14.5421 18 9.57153 18C4.60097 18 0.571533 13.9706 0.571533 9Z" | ||
| fill="#3372FF" | ||
| /> | ||
| <g clip-path="url(#clip0_8992_2377)"> | ||
| <circle cx="9.57153" cy="6.5" r="2.5" fill="#F5F5FF" /> | ||
| <path | ||
| fill-rule="evenodd" | ||
| clip-rule="evenodd" | ||
| d="M8.94653 9.625C6.53029 9.625 4.57153 11.5838 4.57153 14H9.57153H14.5715C14.5715 11.5838 12.6128 9.625 10.1965 9.625H9.82153L10.8215 13.0278L9.57153 14L8.32153 13.0278L9.32153 9.625H8.94653Z" | ||
| fill="#F5F5FF" | ||
| /> | ||
| </g> | ||
| <defs> | ||
| <clipPath id="clip0_8992_2377"> | ||
| <rect width="10" height="10" fill="white" transform="translate(4.57153 4)" /> | ||
| </clipPath> | ||
| </defs> | ||
| </svg> | ||
| ); |
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,19 @@ | ||
| import * as React from "react"; | ||
|
|
||
| import { ISvgIcons } from "./type"; | ||
|
|
||
| export const TeamsIcon: React.FC<ISvgIcons> = ({ className = "text-current", ...rest }) => ( | ||
| <svg className={className} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
| <path | ||
| fillRule="evenodd" | ||
| clipRule="evenodd" | ||
| d="M8.25 6.75C8.25 5.75544 8.64509 4.80161 9.34835 4.09835C10.0516 3.39509 11.0054 3 12 3C12.9946 3 13.9484 3.39509 14.6517 4.09835C15.3549 4.80161 15.75 5.75544 15.75 6.75C15.75 7.74456 15.3549 8.69839 14.6517 9.40165C13.9484 10.1049 12.9946 10.5 12 10.5C11.0054 10.5 10.0516 10.1049 9.34835 9.40165C8.64509 8.69839 8.25 7.74456 8.25 6.75ZM15.75 9.75C15.75 8.95435 16.0661 8.19129 16.6287 7.62868C17.1913 7.06607 17.9544 6.75 18.75 6.75C19.5456 6.75 20.3087 7.06607 20.8713 7.62868C21.4339 8.19129 21.75 8.95435 21.75 9.75C21.75 10.5456 21.4339 11.3087 20.8713 11.8713C20.3087 12.4339 19.5456 12.75 18.75 12.75C17.9544 12.75 17.1913 12.4339 16.6287 11.8713C16.0661 11.3087 15.75 10.5456 15.75 9.75ZM2.25 9.75C2.25 8.95435 2.56607 8.19129 3.12868 7.62868C3.69129 7.06607 4.45435 6.75 5.25 6.75C6.04565 6.75 6.80871 7.06607 7.37132 7.62868C7.93393 8.19129 8.25 8.95435 8.25 9.75C8.25 10.5456 7.93393 11.3087 7.37132 11.8713C6.80871 12.4339 6.04565 12.75 5.25 12.75C4.45435 12.75 3.69129 12.4339 3.12868 11.8713C2.56607 11.3087 2.25 10.5456 2.25 9.75ZM6.31 15.117C6.91995 14.161 7.76108 13.3743 8.75562 12.8294C9.75016 12.2846 10.866 11.9994 12 12C12.9498 11.9991 13.8891 12.1989 14.7564 12.5862C15.6237 12.9734 16.3994 13.5395 17.0327 14.2474C17.6661 14.9552 18.1428 15.7888 18.4317 16.6936C18.7205 17.5985 18.815 18.5541 18.709 19.498C18.696 19.6153 18.6556 19.7278 18.591 19.8265C18.5263 19.9252 18.4393 20.0073 18.337 20.066C16.4086 21.1725 14.2233 21.7532 12 21.75C9.695 21.75 7.53 21.138 5.663 20.066C5.56069 20.0073 5.47368 19.9252 5.40904 19.8265C5.34441 19.7278 5.30396 19.6153 5.291 19.498C5.12305 17.9646 5.48246 16.4198 6.31 15.118V15.117Z" | ||
| fill="currentColor" | ||
| {...rest} | ||
| /> | ||
| <path | ||
| d="M5.08208 14.2539C4.09584 15.7763 3.63633 17.5802 3.77408 19.3889C3.17359 19.2979 2.58299 19.1505 2.01008 18.9489L1.89508 18.9089C1.79248 18.8725 1.70263 18.8071 1.63643 18.7207C1.57023 18.6342 1.53051 18.5305 1.52208 18.4219L1.51208 18.3009C1.47169 17.7989 1.53284 17.2938 1.69188 16.816C1.85093 16.3381 2.10462 15.8971 2.4378 15.5194C2.77099 15.1417 3.17685 14.835 3.63116 14.6176C4.08547 14.4001 4.57893 14.2765 5.08208 14.2539ZM20.2261 19.3889C20.3638 17.5802 19.9043 15.7763 18.9181 14.2539C19.4212 14.2765 19.9147 14.4001 20.369 14.6176C20.8233 14.835 21.2292 15.1417 21.5624 15.5194C21.8955 15.8971 22.1492 16.3381 22.3083 16.816C22.4673 17.2938 22.5285 17.7989 22.4881 18.3009L22.4781 18.4219C22.4695 18.5303 22.4297 18.6338 22.3635 18.7201C22.2973 18.8063 22.2075 18.8716 22.1051 18.9079L21.9901 18.9479C21.4231 19.1479 20.8341 19.2969 20.2261 19.3889Z" | ||
| fill="currentColor" | ||
| /> | ||
| </svg> | ||
| ); |
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.