Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Added notifications center

Steven Teyab2d51fa6b46
diff --git a/components/app/links/link-filters.tsx b/components/app/links/link-filters.tsx
index fb3cdef792..e3b2ec6f70 100644
--- a/components/app/links/link-filters.tsx
+++ b/components/app/links/link-filters.tsx
@@ -67,8 +67,12 @@ export default function LinkFilters() {
<SearchBox searchInputRef={searchInputRef} />
</div>
<DomainsFilter domains={domains} primaryDomain={primaryDomain} />
- <TagsFilter tags={tags} tagsCount={tagsCount} />
- {slug && <MyLinksFilter />}
+ {slug && (
+ <>
+ <TagsFilter tags={tags} tagsCount={tagsCount} />
+ <MyLinksFilter />
+ </>
+ )}
<ArchiveFilter />
</div>
) : (
@@ -288,7 +292,7 @@ const TagsFilter = ({
{...SWIPE_REVEAL_ANIMATION_SETTINGS}
>
{tags?.length === 0 ? ( // if the project has no tags
- <p className="text-center text-sm text-gray-500">No tags yet. </p>
+ <p className="text-center text-sm text-gray-500">No tags yet.</p>
) : (
<>
<div className="relative mb-1">
diff --git a/components/app/modals/add-edit-link-modal/index.tsx b/components/app/modals/add-edit-link-modal/index.tsx
index 1cff211636..e183c16dd0 100644
--- a/components/app/modals/add-edit-link-modal/index.tsx
+++ b/components/app/modals/add-edit-link-modal/index.tsx
@@ -514,7 +514,7 @@ function AddEditLinkModal({
</div>
{/* Divider */}
- <div className="relative py-5">
+ <div className="relative pb-3 pt-5">
<div
className="absolute inset-0 flex items-center px-4 md:px-16"
aria-hidden="true"
diff --git a/components/app/modals/add-edit-link-modal/tags-section.tsx b/components/app/modals/add-edit-link-modal/tags-section.tsx
index b5a5464ea6..d25f561033 100644
--- a/components/app/modals/add-edit-link-modal/tags-section.tsx
+++ b/components/app/modals/add-edit-link-modal/tags-section.tsx
@@ -6,7 +6,7 @@ import {
useRef,
useState,
} from "react";
-import { Check, Search, X } from "lucide-react";
+import { Check, Tag, X } from "lucide-react";
import { Command, useCommandState } from "cmdk";
import TagBadge from "../../links/tag-badge";
import { LinkProps } from "#/lib/types";
@@ -108,7 +108,7 @@ export default function TagsSection({
<Command ref={commandRef} className="relative" loop>
<div className="group mt-1 rounded-md border border-gray-300 bg-white px-1 focus-within:border-gray-500 focus-within:ring-1 focus-within:ring-gray-500">
<div className="absolute inset-y-0 left-0 flex items-center justify-center pl-3 text-gray-400">
- {creatingTag ? <LoadingCircle /> : <Search className="h-4 w-4" />}
+ {creatingTag ? <LoadingCircle /> : <Tag className="h-4 w-4" />}
</div>
<div className="flex h-9 px-8">
{selectedTag ? (
diff --git a/components/layout/app/user-dropdown.tsx b/components/layout/app/user-dropdown.tsx
index 2e3c144ced..680aad64cd 100644
--- a/components/layout/app/user-dropdown.tsx
+++ b/components/layout/app/user-dropdown.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useState } from "react";
+import { Suspense, useEffect, useMemo, useState } from "react";
import { signOut, useSession } from "next-auth/react";
import { Logout } from "@/components/shared/icons";
import Popover from "@/components/shared/popover";
@@ -6,9 +6,11 @@ import IconMenu from "../../shared/icon-menu";
import Image from "next/image";
import va from "@vercel/analytics";
import Link from "next/link";
-import { MessageCircle, Settings } from "lucide-react";
+import { Edit3, MessageCircle, Settings } from "lucide-react";
import { Crisp } from "crisp-sdk-web";
import { LoadingCircle } from "#/ui/icons";
+import Badge from "#/ui/badge";
+import Cookies from "js-cookie";
export default function UserDropdown() {
const { data: session } = useSession();
@@ -25,6 +27,15 @@ export default function UserDropdown() {
});
}, []);
+ const [unread, setUnread] = useState(false);
+ useEffect(() => {
+ if (Cookies.get("read-changelog-0725")) {
+ setUnread(false);
+ } else {
+ setUnread(true);
+ }
+ }, []);
+
return (
<div className="relative inline-block">
<Popover
@@ -68,6 +79,16 @@ export default function UserDropdown() {
icon={<Settings className="h-4 w-4" />}
/>
</Link>
+ <Link
+ href="https://dub.sh/changelog"
+ target="_blank"
+ rel="noopener noreferrer"
+ onClick={() => Cookies.set("read-changelog-0725", true)}
+ className="flex w-full justify-between rounded-md p-2 text-sm transition-all duration-75 hover:bg-gray-100 active:bg-gray-200"
+ >
+ <IconMenu text="Changelog" icon={<Edit3 className="h-4 w-4" />} />
+ {unread && <Badge text="1" variant="blue" />}
+ </Link>
<button
className="w-full rounded-md p-2 text-sm transition-all duration-75 hover:bg-gray-100 active:bg-gray-200"
onClick={() => {
@@ -88,7 +109,7 @@ export default function UserDropdown() {
>
<button
onClick={() => setOpenPopover(!openPopover)}
- className="flex h-9 w-9 items-center justify-center overflow-hidden rounded-full border border-gray-300 transition-all duration-75 focus:outline-none active:scale-95 sm:h-10 sm:w-10"
+ className="group relative"
>
{session && (
<Image
@@ -99,8 +120,12 @@ export default function UserDropdown() {
}
width={40}
height={40}
+ className="h-9 w-9 rounded-full border border-gray-300 transition-all duration-75 group-focus:outline-none group-active:scale-95 sm:h-10 sm:w-10"
/>
)}
+ {unread && (
+ <div className="absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full border-2 border-white bg-blue-500" />
+ )}
</button>
</Popover>
</div>
diff --git a/posts/changelog/new-tag-creation-flow.mdx b/posts/changelog/new-tag-creation-flow.mdx
new file mode 100644
index 0000000000..ab99b91e2d
--- /dev/null
+++ b/posts/changelog/new-tag-creation-flow.mdx
@@ -0,0 +1,15 @@
+---
+title: New Tag Creation Flow
+publishedAt: 2023-07-02
+summary: "We're changing the way you create tags on Dub. Instead of a separate link tagging modal, we've combined it with the link creation flow."
+image: "https://d2vwwcvoksz7ty.cloudfront.net/changelog/new-tag-creation-flow.png"
+author: "steventey"
+---
+
+We're changing the way you create tags on Dub.
+
+Instead of a separate link tagging modal, we've combined it with the link creation flow. This makes it easier to create tags, and also allows you to add tags to your links as you create them.
+
+Here's a [quick 2-min Loom video](https://www.loom.com/share/f7c17d8bcaf443f2a971a620a3a3126f) explaining the difference between the old and new flows.
+
+Shoutout to [Fazle](https://twitter.com/fazlerocks) from [Hashnode](https://hashnode.com/) for the [feature request](https://github.com/steven-tey/dub/issues/240)!