Skip to content
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

New layout code #5

Merged
merged 46 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2db3a39
move all layout logic in AppLayout
anish-work Aug 22, 2024
3fd05b2
add sidebar component
anish-work Aug 22, 2024
0caf8ee
store conversations in Indexed DB
anish-work Aug 23, 2024
a7c3007
send user_id in api request
anish-work Aug 23, 2024
5b76638
store conversations on message updates
anish-work Aug 26, 2024
091ec85
remove unused items
anish-work Aug 26, 2024
a3dfc11
add gooeyShadowRoot to globalThis
anish-work Aug 28, 2024
835ef41
fix small width support for sidebar
anish-work Aug 28, 2024
f7a7f1e
sync focus mode and side bar
anish-work Aug 28, 2024
dcd3659
support disableConversations config
anish-work Aug 28, 2024
78276f5
adjust css for mobile
anish-work Aug 28, 2024
8314b0d
add yesterday to conversation list
anish-work Aug 28, 2024
ecd6f7f
build: 2.1
anish-work Aug 28, 2024
faba527
fix auto-playing audio messages on load
anish-work Aug 29, 2024
485841a
auto close sidebar in mobile
anish-work Aug 29, 2024
6112ecb
rebuild: 2.1
anish-work Aug 29, 2024
0ad2d37
add new conversation icon in sidebar
anish-work Sep 3, 2024
f1b4eb6
set title to first user query
anish-work Sep 3, 2024
f50eb75
chores
anish-work Sep 5, 2024
00efe41
build: 2.1.0
anish-work Sep 5, 2024
1df9ee3
fix focus visible
anish-work Sep 5, 2024
e7e2427
build: 2.1.1
anish-work Sep 5, 2024
fa9604e
build: 2.1.2
anish-work Sep 5, 2024
7912836
fetch latest list in addConversation
anish-work Sep 5, 2024
6268720
sidebar click away listener
anish-work Sep 5, 2024
5e1c4aa
pass db to formatter
anish-work Sep 5, 2024
650c524
build: 2.1.3
anish-work Sep 5, 2024
bf91055
css fixes
anish-work Sep 5, 2024
0e813a0
copy master main .tsx file
anish-work Sep 6, 2024
ec6f185
fix scroll issue
anish-work Sep 6, 2024
44ec9b6
fix new chat button
anish-work Sep 6, 2024
4b04ce9
cancel api call when conversation load
anish-work Sep 6, 2024
33e26f6
add new tooltip component
anish-work Sep 6, 2024
2885cc3
show empty convo list text
anish-work Sep 6, 2024
8f50923
fix video bg
anish-work Sep 6, 2024
877142a
disable button when if on same view
anish-work Sep 6, 2024
1dc23c8
Merge branch 'tooltip_component' into new_layout_code
anish-work Sep 6, 2024
77dbd9c
add more tooltips
anish-work Sep 6, 2024
e80c617
namespace classes
anish-work Sep 6, 2024
28504cf
fix tooltip drop
anish-work Sep 6, 2024
be29170
build: 2.1.4
anish-work Sep 6, 2024
2c93569
sidebar tooltip to right
anish-work Sep 6, 2024
475f60d
build: 2.1.5
anish-work Sep 6, 2024
2894844
pass user_id to api
anish-work Sep 7, 2024
a8e0786
handle touch devices in tooltip
anish-work Sep 7, 2024
592492d
build: 2.1.6
anish-work Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions dist/lib.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gooey-chat",
"private": true,
"version": "0.0.0",
"version": "2.1.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
24 changes: 0 additions & 24 deletions src/assets/SvgIcons/BackIcon.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions src/assets/SvgIcons/HomeIcon.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/assets/SvgIcons/IconExternalLink.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/assets/SvgIcons/IconListTimeline.tsx

This file was deleted.

22 changes: 22 additions & 0 deletions src/assets/SvgIcons/IconSideBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import SvgIcon from "src/components/shared/SvgIcon";

const IconSidebar = (props: any) => {
const size = props.size || 16;
return (
<SvgIcon>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
width={size}
height={size}
>
//--!Font Awesome Pro 6.6.0 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license (Commercial License) Copyright
2024 Fonticons, Inc.--
<path d="M448 64c17.7 0 32 14.3 32 32l0 320c0 17.7-14.3 32-32 32l-224 0 0-384 224 0zM64 64l128 0 0 384L64 448c-17.7 0-32-14.3-32-32L32 96c0-17.7 14.3-32 32-32zm0-32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM80 96c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L80 96zM64 176c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zm16 48c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0z" />
</svg>
</SvgIcon>
);
};

export default IconSidebar;
24 changes: 0 additions & 24 deletions src/assets/SvgIcons/MessageIcon.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions src/assets/SvgIcons/PaperAirplaneIcon.tsx

This file was deleted.

9 changes: 1 addition & 8 deletions src/components/containers/withFabLauncher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,9 @@ type WithFabLauncherType = {

const WithFabLauncher: FC<WithFabLauncherType> = ({ children, open }) => (
<div
tabIndex={-1}
role="reigon"
tabIndex={-1}
className="pos-relative"
style={{
height: "100%",
width: "100%",
background: "none",
overflow: "auto",
zIndex: 1,
}}
>
{!open && <Launcher />}
{open && <>{children}</>}
Expand Down
27 changes: 26 additions & 1 deletion src/components/shared/Buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ReactNode } from "react";

import { addInlineStyle } from "src/addStyles";
import style from "./buttons.scss?inline";
import clsx from "clsx";
addInlineStyle(style);

export interface ButtonProps
Expand All @@ -10,13 +11,19 @@ export interface ButtonProps
children?: ReactNode;
className?: string;
variant?: "filled" | "contained" | "outlined" | "text" | "text-alt";
RightIconComponent?: React.FC<any>;
showIconOnHover?: boolean;
hideOverflow?: boolean;
}

const Button = ({
// size = "medium",
variant = "text",
className = "",
onClick,
RightIconComponent,
showIconOnHover,
hideOverflow,
...rest
}: ButtonProps) => {
const variantClasses = `button-${variant?.toLowerCase()}`;
Expand All @@ -27,7 +34,25 @@ const Button = ({
onMouseDown={onClick}
className={variantClasses + " " + className}
>
{rest.children}
<div
className={clsx(
"pos-relative w-100 h-100",
hideOverflow && "btn-hide-overflow"
)}
>
{rest.children}
{RightIconComponent && (
<div
className={clsx(
"btn-icon right-icon",
showIconOnHover && "icon-hover"
)}
>
<RightIconComponent />
</div>
)}
{hideOverflow && <div className="button-right-blur" />}
</div>
</button>
);
};
Expand Down
28 changes: 26 additions & 2 deletions src/components/shared/Buttons/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,38 @@ button {
border-radius: 8px;
padding: 8px;
color: $almost-black;
width: fit-content;
}

button:disabled {
color: $muted !important;
fill: $light;
cursor: unset;
}

// Variant - FILED
button .btn-icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
z-index: 2;
}

button .icon-hover {
opacity: 0;
}

button .btn-hide-overflow p {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

button:hover .icon-hover {
opacity: 1;
}

// Variant - FILLED
.button-filled {
background-color: #eee;
}
Expand Down Expand Up @@ -64,7 +88,7 @@ button:disabled {
}

.button-text-alt:hover {
border: 1px solid transparent;
background-color: $light;
}

.collapsed-area {
Expand Down
Loading
Loading