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

Can't paste org URL into add-account input #5228

Closed
chrisbobbe opened this issue Feb 11, 2022 · 3 comments · Fixed by #5287
Closed

Can't paste org URL into add-account input #5228

chrisbobbe opened this issue Feb 11, 2022 · 3 comments · Fixed by #5287
Assignees
Labels
a-onboarding Everything you would do when first joining a realm. P1 high-priority

Comments

@chrisbobbe
Copy link
Contributor

See discussion: https://chat.zulip.org/#narrow/stream/48-mobile/topic/can't.20paste.20org.20URL/near/1318402

Quoting myself from there:

As a product question, how much do we really need/like the current "smart"ness of the SmartUrlInput, where there's some editable text sandwiched between two non-editable texts whose values are computed?

This would all be simpler and less bug-prone if the whole line were just a normal text input. I think we could even pre-populate it with something like https://your-org.zulipchat.com, with your-org selected by default (doc, doc). If we do pre-populate, then there's a downside if your org doesn't follow the https://your-org.zulipchat.com pattern: you have to explicitly clear out the part you don't want and replace it. (Like you'd do with any normal pre-populated text input. 😉)

@chrisbobbe chrisbobbe added a-onboarding Everything you would do when first joining a realm. P1 high-priority labels Feb 11, 2022
@thisisnitish
Copy link
Contributor

thisisnitish commented Feb 21, 2022

Hi @chrisbobbe!, can I give it a shot to this issue??. Thanks 🙂

@chrisbobbe chrisbobbe self-assigned this Feb 22, 2022
@chrisbobbe
Copy link
Contributor Author

Hi @thisisnitish, thanks for the offer! 🙂 I've actually been working on this one myself. I see I forgot to assign myself in the issue metadata; I've just done so.

@thisisnitish
Copy link
Contributor

Sure @chrisbobbe, no problem. I'll find some other issue. Thanks 🙂

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 10, 2022
And just use an ordinary controlled TextInput, always stretched to
full width, and never just 1px.

The major reason for this is to help with zulip#5228 (can't paste org
URL): native copy-paste is activated by long-pressing in the input
element itself. But long-pressing is really hard when the element is
only 1px wide!

No need to autocomplete with "zulipchat.com", so as not to annoy
self-hosted users, as discussed. It does seem helpful to prepopulate
with "https://" for the sake of users who aren't copy-pasting.

With that "https://" prepopulating in mind, we'll improve this
experience further, along the lines of what Alya says:

> One would have to play with pasting behavior to make sure
> something reasonable happens if you are trying to paste in a whole
> URL, including the https part.

That'll come later in this series.

See discussion at
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/can't.20paste.20org.20URL/near/1327170

Fixes-partly: zulip#5228
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 10, 2022
Prompted by Alya's comment on CZO [1]:

> One would have to play with pasting behavior to make sure
> something reasonable happens if you are trying to paste in a whole
> URL, including the `https` part.

[1] https://chat.zulip.org/#narrow/stream/48-mobile/topic/can't.20paste.20org.20URL/near/1327170

Fixes: zulip#5228
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 29, 2022
And just use an ordinary controlled TextInput, always stretched to
full width, and never just 1px.

The major reason for this is to fix zulip#5228 (can't paste org URL):
native copy-paste is activated by long-pressing in the input element
itself. But long-pressing is really hard when the element is only
1px wide!

Include some placeholder text to help people have some idea of what
to put here. Don't require or prefill with "https://"; instead, fill
that in if no supported scheme is provided. ("Supported scheme" just
means "http://" or "https://"; other schemes just don't make sense
in this context.)

See discussion at
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/can't.20paste.20org.20URL/near/1327170

Fixes: zulip#5228
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Mar 29, 2022
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 5, 2022
And just use an ordinary controlled TextInput, always stretched to
full width, and never just 1px.

The major reason for this is to fix zulip#5228 (can't paste org URL):
native copy-paste is activated by long-pressing in the input element
itself. But long-pressing is really hard when the element is only
1px wide!

Include some placeholder text to help people have some idea of what
to put here. Don't require or prefill with "https://"; instead, fill
that in if no supported scheme is provided. ("Supported scheme" just
means "http://" or "https://"; other schemes just don't make sense
in this context.)

See discussion at
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/can't.20paste.20org.20URL/near/1327170

Fixes: zulip#5228
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 5, 2022
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-onboarding Everything you would do when first joining a realm. P1 high-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants