-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Bundle SizesCompared against fe289b5
Dynamic import: No significant changes found |
} | ||
|
||
const { bio } = user; | ||
const unescapedBio = useMemo(() => (bio ? unescape(bio) : ''), [bio]); |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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
const bioFirstLine = useMemo(() => { | ||
if (!unescapedBio) { | ||
return ''; | ||
} | ||
return unescapedBio.split('\n')[0] ?? ''; | ||
}, [unescapedBio]); |
There was a problem hiding this comment.
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] ?? ''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Screen.Recording.2024-04-05.at.05.58.30.mov
Edge Cases
Moweb
Testing Steps
Provide steps on how the reviewer can test the changes.
Checklist
Please make sure to review and check all of the following: