-
Notifications
You must be signed in to change notification settings - Fork 9
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: APP-243 disable create post button in keplr mobile #2433
feat: APP-243 disable create post button in keplr mobile #2433
Conversation
✅ Deploy Preview for regen-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@erikalogie @clevinson see testing instructions |
I can't seem to sign the transaction to actually log in. I tried restarting my phone and same issue. |
I have the same problem. |
Do we need to open a separate task to de-bug that in order to test this one? @r41ph |
I'm not sure. On mobile I can login into dev.app.regen.network but not into the deploy previews.. is this known/expected @blushi ? |
Are you trying to log in with email/google or wallet connect? |
I was logging in with Wallet Connect on my android device |
web-components/src/components/cards/ProjectCard/ProjectCard.tsx
Outdated
Show resolved
Hide resolved
I've added the deploy preview domain to the allowed ones in Wallet Connect cloud, so you should be able to login now. |
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 also want to hide the "edit project" button in this case, which doesn't seem to be handled here
@@ -33,7 +33,7 @@ const MyProjects = (): JSX.Element => { | |||
useDashboardContext(); | |||
const { track } = useTracker(); | |||
const [projectsCurrentStep] = useAtom(projectsCurrentStepAtom); | |||
const { wallet, loginDisabled } = useWallet(); | |||
const { wallet, loginDisabled, isKeplrMobileWeb } = useWallet(); |
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.
isKeplrMobileWeb
is not the right variable to use here.
It indicates whether you're connected from the Keplr mobile app itself (from their in-app browser) or not.
Instead, we want to use loginDisabled
which will be true in those cases:
- connected through wallet connect from mobile
- connected through wallet connect from desktop
- connected from the keplr mobile in-app browser (but we can't really test this with deploy previews since it points to the production app)
867e809
to
5b24b57
Compare
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.
so the "edit project" button is greyed out while the "create post" button is completely hidden
should we just hide all buttons? cc/ @erikalogie
Maybe instead it would be better to add a tooltip on rollover of the button that explains why editing isn't possible? Even I forgot and got confused while testing. Something like "Editing this project requires signing a transaction not supported by Keplr mobile. Please log in on desktop to edit this project." Does that tooltip text make sense to you @blushi? |
That could be helpful indeed, I'll think a bit more about the wording. |
Thinking about having consistent behavior throughout the app regarding that feature limitation. Right now, we also just hide the "edit profile" nav item. If we want to be consistent, we would also have this nav item disabled instead and show a tooltip on rollover. |
@erikalogie any thoughts on this? |
I think this is a good idea just to avoid confusion. I like your suggestion for the tooltip too. |
@r41ph it's becoming a bit out of scope of the initial issue, would you rather address adding the tooltip and dealing with "edit profile" in another task? or should we do it all as part of this one? In any case, here we would want to disable "create post" instead of completely hiding it. |
We've discussed this with @r41ph and agreed to handle the user menu items (edit profile and settings) in a separate task. |
Sounds good! Can someone put that task into the upcoming sprint? |
done: https://regennetwork.atlassian.net/jira/software/c/projects/ENG/boards/51?selectedIssue=APP-330 |
Ok cool. Summarising: Both |
SGTM |
LGTM, only thing (which can be separate issue) is that the "edit" icon seems to disappear here when "edit project" is disabled. Should be white icon on the grey so it is still viewable. |
c670e7f
to
c20a0cb
Compare
c20a0cb
to
d254475
Compare
@erikalogie the icon should be visible now |
Great, LGTM! |
web-components/src/components/cards/ProjectCard/ProjectCard.tsx
Outdated
Show resolved
Hide resolved
web-components/src/components/cards/ProjectCard/ProjectCard.tsx
Outdated
Show resolved
Hide resolved
77aab08
to
b3613d8
Compare
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.
b3613d8
to
796e196
Compare
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.
tACK, pre-approving, pending small nit
@@ -2,6 +2,7 @@ import { msg } from '@lingui/macro'; | |||
|
|||
export const DRAFT_ID = 'draft'; | |||
export const CREATE_POST = msg`+ create post`; | |||
export const CREATE_POST_DISABLED_TOOLTIP = msg`You cannot make posts because either the project is still a draft or it doesn't have assigned a location.`; | |||
export const CREATE_POST_TOOLTIP_TEXT = msg`You cannot make posts because either the project is still a draft or it doesn't have assigned a location.`; | |||
export const EDIT_PROJECT_TOOLTIP_TEXT = msg`This is not yet supported by Wallet Connect and Keplr mobile. Please log in using Keplr browser extension on desktop.`; |
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.
maybe we could rename this to NOT_SUPPORTED_TOOLTIP_TEXT or something similar since this is not just about editing a project
…of isKeplrMobileWeb
77499a3
to
a6e4788
Compare
Description
https://regennetwork.atlassian.net/browse/APP-243
Author Checklist
How to test
Create Post
buttons in the admin's projects page are not visible.Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...