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

fix-#80 ui button issue solved #85

Conversation

mohamedshamil7
Copy link
Contributor

@mohamedshamil7 mohamedshamil7 commented Dec 16, 2023

Summary

Ui - button on the latest post card redirecting to a empty tab solved

Description

button on the latest post card redirecting to a empty tab solved . Removed the navigation functionality

Issue(s) Addressed

Closes #80

Copy link

vercel bot commented Dec 16, 2023

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

Name Status Preview Comments Updated (UTC)
wanderlust ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2023 5:23pm
wanderlust-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2023 5:23pm

Copy link
Owner

@krishnaacharyaa krishnaacharyaa left a comment

Choose a reason for hiding this comment

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

Why all this? circus, can't we simply navigate? or something like we dont let the user to click this by making it unclickable,

At the least we can just remove away this navigate(-1) then nothing will happen :)

@mohamedshamil7
Copy link
Contributor Author

there are multiple ways to solve the issue , either we could just remove that button or use it to open the blog in a new page . Leaving that button with no function will not be a good way to solve the issue . Making that button to open the blog in the same page will also be useless as we are already using the navigate fn on the main div .

i thought of opening the blog in a new tab would be effective and added the function to do so . I read using "target:_blank" directly might have some security concerns . Please correct me if I am wrong ! .

I Could directly navigate to the new tab or simply just remove the button . Both options feel right to me . can you suggest your opinion ?

@krishnaacharyaa
Copy link
Owner

@mohamedshamil7 lets not complicate this
image

The very obvious fix would be just copy pasting Line No: 14's onclick to 22's onclick, that will solve the issue.

I just want you to explore if there is any other way of doing this, by which i mean,
Now the button is the child of the parent div in which the navigation is working perfectly fine right?
There may be some way that we may this button's click of no effect and letting it work simply like the parent, you can try just by removing the onclick, see if the existing parent's click works.

I really appreciate your thoughts and creativeness of opening in a new tab, but we would ideally don't want that much of complexity presently, and the present PR doesn't actually work as per your fix.
image

@mohamedshamil7
Copy link
Contributor Author

As per your suggestion i think at present there is no much use of that button . I guess i will remove the navigate functionality from the button

@krishnaacharyaa
Copy link
Owner

Yeah it is just to indicate that if you click this post you'll go to the details, as said in discord, it is for UX, showpiece basically.
It alone doesn't have any functionality

Copy link
Owner

@krishnaacharyaa krishnaacharyaa left a comment

Choose a reason for hiding this comment

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

Yeah that's it :)

@krishnaacharyaa krishnaacharyaa merged commit da265e2 into krishnaacharyaa:main Dec 16, 2023
3 checks passed
@mohamedshamil7 mohamedshamil7 deleted the bugfix/80-ui-latest-postcard-button-issue branch December 16, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI - small button on the latest post card redirecting back to normal tab
2 participants