From 1bba45f6b474707db904094cee61d0a5ad84be39 Mon Sep 17 00:00:00 2001 From: Bjorn Lammers Date: Fri, 25 Apr 2025 17:55:17 +0200 Subject: [PATCH] refactor(web): Update descriptions and consistency (#1264) * refactor(web): Update descriptions and consistency * revert: Issue templates * refactor(web): More extensive search placeholder --------- Signed-off-by: Bjorn Lammers Co-authored-by: Thomas Camlong --- web/src/app/error.tsx | 6 +- web/src/app/icons/components/icon-search.tsx | 96 +++++++++++--------- web/src/app/not-found.tsx | 10 +- web/src/components/footer.tsx | 2 +- web/src/components/hero.tsx | 62 +++++++++++-- web/src/components/icon-details.tsx | 42 +++++---- web/src/components/icon-submission-form.tsx | 6 +- web/src/components/recently-added-icons.tsx | 4 +- 8 files changed, 149 insertions(+), 79 deletions(-) diff --git a/web/src/app/error.tsx b/web/src/app/error.tsx index 3b332632..8c7660fc 100644 --- a/web/src/app/error.tsx +++ b/web/src/app/error.tsx @@ -32,16 +32,16 @@ export default function ErrorPage({

Something went wrong

- An unexpected error occurred while loading this page. We've been notified and are looking into it. + Unable to load this page. We're looking into the issue.

{error.digest &&

Error ID: {error.digest}

} diff --git a/web/src/app/icons/components/icon-search.tsx b/web/src/app/icons/components/icon-search.tsx index 8639a582..321a56fd 100644 --- a/web/src/app/icons/components/icon-search.tsx +++ b/web/src/app/icons/components/icon-search.tsx @@ -228,11 +228,11 @@ export function IconSearch({ icons }: IconSearchProps) { const getSortLabel = (sort: SortOption) => { switch (sort) { case "relevance": - return "Best match" + return "Relevance" case "alphabetical-asc": - return "A to Z" + return "Name (A-Z)" case "alphabetical-desc": - return "Z to A" + return "Name (Z-A)" case "newest": return "Newest first" default: @@ -265,7 +265,7 @@ export function IconSearch({ icons }: IconSearchProps) { handleSearch(e.target.value)} @@ -277,18 +277,18 @@ export function IconSearch({ icons }: IconSearchProps) { {/* Filter dropdown */} - - Categories + Select Categories
@@ -314,7 +314,7 @@ export function IconSearch({ icons }: IconSearchProps) { }} className="cursor-pointer focus: focus:bg-rose-50 dark:focus:bg-rose-950/20" > - Clear all filters + Clear categories )} @@ -330,18 +330,18 @@ export function IconSearch({ icons }: IconSearchProps) { - Sort By + Sort Icons handleSortChange(value as SortOption)}> - Best match + Relevance - A to Z + Name (A-Z) - Z to A + Name (Z-A) @@ -353,9 +353,15 @@ export function IconSearch({ icons }: IconSearchProps) { {/* Clear all button */} {(searchQuery || selectedCategories.length > 0 || sortOption !== "relevance") && ( - )}
@@ -363,7 +369,7 @@ export function IconSearch({ icons }: IconSearchProps) { {/* Active filter badges */} {selectedCategories.length > 0 && (
- Filters: + Selected:
{selectedCategories.map((category) => ( @@ -389,7 +395,7 @@ export function IconSearch({ icons }: IconSearchProps) { }} className="text-xs h-7 px-2 cursor-pointer" > - Clear all + Clear
)} @@ -400,27 +406,33 @@ export function IconSearch({ icons }: IconSearchProps) { {filteredIcons.length === 0 ? (
-

We don't have this one...yet!

+

Icon not found

+

Help us expand our collection

+
+
+ +
+ Can't submit it yourself? + +
- -
) : ( <> @@ -462,7 +474,7 @@ function IconCard({ className="object-contain p-1 group-hover:scale-110 transition-transform duration-300" />
- + {name.replace(/-/g, " ")} diff --git a/web/src/app/not-found.tsx b/web/src/app/not-found.tsx index 08f18a5a..5f1f115a 100644 --- a/web/src/app/not-found.tsx +++ b/web/src/app/not-found.tsx @@ -15,9 +15,9 @@ export default function NotFound({
-

Icon not found

+

Not found

- The icon you are looking for could not be found or there was an error loading it. + This icon does not exist or could not be loaded.

@@ -25,16 +25,16 @@ export default function NotFound({
-

Can't find what you're looking for?

+

Missing an icon?

- Contribute to our icon collection by suggesting a new icon or improving an existing one. + Submit a new icon or suggest improvements to our collection.

diff --git a/web/src/components/footer.tsx b/web/src/components/footer.tsx index 251394d3..2395d748 100644 --- a/web/src/components/footer.tsx +++ b/web/src/components/footer.tsx @@ -37,7 +37,7 @@ export function Footer() {

Dashboard Icons

- A collection of curated icons for services, applications and tools, designed specifically for dashboards and app directories. + Collection of icons for applications, services, and tools - designed for dashboards and app directories.

diff --git a/web/src/components/hero.tsx b/web/src/components/hero.tsx index 5117a002..d373b1b2 100644 --- a/web/src/components/hero.tsx +++ b/web/src/components/hero.tsx @@ -205,13 +205,61 @@ export function HeroSection({ totalIcons, stars }: { totalIcons: number; stars: />
-
+

Your definitive source for - + + + + +
- + + + + + dashboard icons

@@ -224,7 +272,7 @@ export function HeroSection({ totalIcons, stars }: { totalIcons: number; stars:
- Explore icons + Browse icons @@ -449,12 +497,12 @@ export function GiveUsMoneyButton() {
@@ -478,7 +526,7 @@ function SearchInput({ searchQuery, setSearchQuery, totalIcons }: SearchInputPro name="q" autoFocus type="search" - placeholder={`Find any of ${totalIcons} icons by name or category...`} + placeholder={`Search our collection of ${totalIcons} icons by name or category...`} className="pl-10 h-10 md:h-12 rounded-lg w-full border-border focus:border-primary/20 text-sm md:text-base" value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} diff --git a/web/src/components/icon-details.tsx b/web/src/components/icon-details.tsx index 28cda419..5b760e2d 100644 --- a/web/src/components/icon-details.tsx +++ b/web/src/components/icon-details.tsx @@ -207,6 +207,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { size="icon" className="h-8 w-8 rounded-lg cursor-pointer" onClick={(e) => handleDownload(e, imageUrl, `${iconName}.${format}`)} + aria-label={`Download ${iconName} in ${format} format${theme ? ` (${theme} theme)` : ""}`} > @@ -223,6 +224,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { size="icon" className="h-8 w-8 rounded-lg cursor-pointer" onClick={(e) => handleCopy(imageUrl, `btn-${variantKey}`, e)} + aria-label={`Copy URL for ${iconName} in ${format} format${theme ? ` (${theme} theme)` : ""}`} > {copiedVariants[`btn-${variantKey}`] ? : } @@ -234,8 +236,18 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { - @@ -252,7 +264,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { } return ( -
+
{/* Left Column: Icon Info and Author */}
@@ -306,7 +318,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { {iconData.categories && iconData.categories.length > 0 && (
-

Categories

+

Categories

{iconData.categories.map((category) => ( @@ -327,7 +339,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { {iconData.aliases && iconData.aliases.length > 0 && (
-

Aliases

+

Aliases

{iconData.aliases.map((alias) => ( -

About this icon

+

About this icon

- Available in{" "} - {availableFormats.length > 1 - ? `${availableFormats.length} formats (${availableFormats.map((f) => f.toUpperCase()).join(", ")})` - : `${availableFormats[0].toUpperCase()} format`}{" "} + Available in {availableFormats.length > 1 + ? `${availableFormats.length} formats (${availableFormats.map((f) => f.toUpperCase()).join(", ")}) ` + : `${availableFormats[0].toUpperCase()} format `} with a base format of {iconData.base.toUpperCase()}. {iconData.colors && " Includes both light and dark theme variants for better integration with different UI designs."}

- Use the {icon} icon in your web applications, dashboards, or documentation to enhance visual communication and user - experience. + Perfect for adding to dashboards, app directories, documentation, or anywhere you need the {icon.replace(/-/g, " ")} logo.

@@ -412,7 +422,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {
-

Base format

+

Base format

{iconData.base.toUpperCase()}
@@ -420,7 +430,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {
-

Available formats

+

Available formats

{availableFormats.map((format) => (
@@ -432,7 +442,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { {iconData.colors && (
-

Color variants

+

Color variants

{Object.entries(iconData.colors).map(([theme, variant]) => (
@@ -446,7 +456,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { )}
-

Source

+

Source

- Contribute a new icon - Choose a template below to suggest a new icon or improve an existing one. + Submit an icon + Select an option below to submit or update an icon.
setOpen(false)} /> diff --git a/web/src/components/recently-added-icons.tsx b/web/src/components/recently-added-icons.tsx index dc765f4a..576b95b5 100644 --- a/web/src/components/recently-added-icons.tsx +++ b/web/src/components/recently-added-icons.tsx @@ -30,7 +30,7 @@ export function RecentlyAddedIcons({ icons }: { icons: IconWithName[] }) { {/* Background glow */}