-
Notifications
You must be signed in to change notification settings - Fork 158
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
Feat/UI ux enhancement framegear #1241
Merged
Zizzamia
merged 7 commits into
coinbase:main
from
adarshswaminath:feat/ui-ux-enhancement-framegear
Sep 14, 2024
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c3a3377
feat:Improve UX with placeholder for missing images and enhanced imag…
adarshswaminath 6141e95
feat(ui): add loading state for frame fetching in FrameInput component
adarshswaminath 73de46b
feat(ui): improve Home component responsiveness and layout
adarshswaminath 6ba350f
refactor: integrate clsx for conditional classnames in Frame component
adarshswaminath 046e8b7
feat: update placeholder image to local file when image.src is missing
adarshswaminath 1393120
chore: add temporary comments from previous code, to be cleaned up later
adarshswaminath fa98c86
fix(ui): replace 404 placeholder with "No Image Found" message for in…
adarshswaminath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,14 @@ export function FrameInput() { | |
const [url, setUrl] = useState(''); | ||
const [_, setResults] = useAtom(frameResultsAtom); | ||
const { setInputText } = useTextInputs(); | ||
const [isLoading, setIsLoading] = useState(false); | ||
|
||
const getResults = useCallback(async () => { | ||
setIsLoading(true) | ||
const result = await fetchFrame(url); | ||
setResults((prev) => [...prev, result]); | ||
setInputText(''); | ||
setIsLoading(false) | ||
}, [setInputText, setResults, url]); | ||
|
||
return ( | ||
|
@@ -28,12 +31,12 @@ export function FrameInput() { | |
/> | ||
</label> | ||
<button | ||
className="h-[40px] self-end rounded-full bg-white text-black" | ||
className={`h-[40px] self-end rounded-full ${isLoading ? "bg-neutral-800 text-white" : "bg-white text-black"}`} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe you can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I will implement the |
||
type="button" | ||
onClick={getResults} | ||
disabled={url.length < 1} | ||
> | ||
Fetch | ||
{isLoading ? "Loading..." : "Fetch"} | ||
</button> | ||
</div> | ||
); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry we can not have links here on random websites.
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.
would it be acceptable if I add the images directly to the public folder of the project and reference them from there?
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.
yup, but only if it's a cool image. If it's not, is probably best have something else as default.
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.
is it ok ?
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.
I think is best we avoid add those kind of images so far. As we want our designer to take a look at it.
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.
Ok, I'll update the image based on the designer's review.