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

[GAL-5439] add default state for web search results #2391

Merged
merged 24 commits into from
Apr 8, 2024

Conversation

Rohan-cp
Copy link
Collaborator

@Rohan-cp Rohan-cp commented Apr 2, 2024

Summary of Changes

Provide a brief description of the changes made in this PR. Explain the problem you are fixing or the feature you are adding.

Demo

Before After
Screenshot 2024-04-02 at 20 10 09 Screenshot 2024-04-05 at 06 07 02
Screen.Recording.2024-04-05.at.05.58.30.mov

Edge Cases

Moweb

Screenshot 2024-04-06 at 04 46 05

Testing Steps

Provide steps on how the reviewer can test the changes.

Checklist

Please make sure to review and check all of the following:

  • I've tested the changes and all tests pass.
  • (if web) I've tested the changes on various desktop screen sizes to ensure responsiveness.
  • (if mobile) I've tested the changes on both light and dark modes.

Copy link

vercel bot commented Apr 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gallery ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2024 10:37pm

@github-actions github-actions bot added the web label Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

Bundle Sizes

Compared against fe289b5

Route Size (gzipped) Diff
/[username] 395.73 KB +3.74 KB
/[username]/[collectionId] 401.97 KB +3.75 KB
/[username]/bookmarks 401.57 KB +3.74 KB
/[username]/followers 400.38 KB +3.74 KB
/[username]/galleries 420.17 KB +3.74 KB
/[username]/galleries/[galleryId] 398.92 KB +3.74 KB
/[username]/posts 481.37 KB +3.74 KB
/community/[chain]/[contractAddress] 475.44 KB +3.71 KB
/community/artblocks/[contractAddress]/[projectId] 475.47 KB +3.71 KB
/community/prohibition/[contractAddress]/[projectId] 475.47 KB +3.71 KB
/explore 388.08 KB +3.71 KB
/following 450.24 KB +3.74 KB
/home 451.79 KB +3.74 KB
/latest 449.68 KB +3.74 KB
/mobile 356.17 KB +3.74 KB
/post/[postId] 449.38 KB +3.75 KB

Dynamic import: No significant changes found

@Rohan-cp Rohan-cp changed the title add suggested profiles search default state for web search results Apr 3, 2024
@Rohan-cp Rohan-cp changed the title default state for web search results add default state for web search results Apr 3, 2024
@Rohan-cp Rohan-cp changed the title add default state for web search results [GAL-5439] add default state for web search results Apr 3, 2024
@Rohan-cp Rohan-cp marked this pull request as ready for review April 5, 2024 09:57
}

const { bio } = user;
const unescapedBio = useMemo(() => (bio ? unescape(bio) : ''), [bio]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't need to manually unescape on the frontend anymore, the backend should handle this!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update: the backend unescaping happens in schema.resolvers.helpers.go: https://github.com/gallery-so/go-gallery/pull/1214/files

ask: in a follow-up PR, can you track down all the cases where the frontend calls unescape (screenshot), then ensure the necessary locations in the backend unescapes those fields? the end result should be that we don't call unescape anywhere in the frontend

image

Comment on lines 78 to 83
const bioFirstLine = useMemo(() => {
if (!unescapedBio) {
return '';
}
return unescapedBio.split('\n')[0] ?? '';
}, [unescapedBio]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be able to shortcut the above few lines:

user.bio?.split('\n')[0] ?? ''

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! made the change and checked it doesn't break anything

Screenshot 2024-04-08 at 18 33 48

@Robinnnnn Robinnnnn merged commit 4dbbb1a into main Apr 8, 2024
7 checks passed
@Robinnnnn Robinnnnn deleted the rohan/add-suggested-profiles-search branch April 8, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants