telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
25.88k stars 5.13k forks source link

Telegram Desktop input field is under onscreen keyboard on tablet in landscape orientation, so it's not visible to user #3274

Open RussianNeuroMancer opened 7 years ago

RussianNeuroMancer commented 7 years ago
### Steps to reproduce 1. Install Linux with Gnome Shell and [Onboard](https://launchpad.net/onboard) on x86 tablet; deal with touchscreen driver, if there is any issue, 2. Configure Gnome Shell and Onboard by following recommendations below, 3. Set screen to landscape orientation if it's not default, start Telegram, select chat, summon Onboard. ### Expected behaviour Onboard appear on the screen, input field is visible ### Actual behaviour Onboard interfere with Telegram's [windowMinHeight](https://github.com/telegramdesktop/tdesktop/blob/22d905b39c6d0f535748043c11c0da9b19c388a1/Telegram/SourceFiles/window/window.style#L27), therefore input field turn out to be under Onboard, so user can't see text that he enter. Qt seems like take font size from "Gnome Tweak Tool" as recommendation for DPI calculation, so issue is reproducible even if there is enough space for Telegram window (480 or more pixels is available.) ### Configuration **Environment:** Ubuntu Gnome 16.04, 16.10 and 17.04 was tested Lenovo Thinkpad Helix, Dell 5855, Dell 7140, Dell 9250, DEXP Ursus 7W, DEXP Ursus 10XW tablets was tested Screen resolution from 1024x600 to 1920x1080 was tested Onscreen keyboard Onboard has been used instead of Caribou (Gnome Shell integrated onscreen keyboard) because there is no Russian keyboard layout in Caribou Telegram version is 1.0.29, default theme. **Gnome Tweak Tool settings:** Font size was set to 1.15-1.5 depends on the screen size and screen resolution. This is important to adjust this option to some sane value to reproduce this issue. For example for 1920x1080 set Font size to 1.30. **Onboard settings**: Onboard was configured to be attached the bottom edge of the screen Onboard size was set to around 40% of the screen in landscape orientation
Aokromes commented 7 years ago

1297 ?

RussianNeuroMancer commented 7 years ago

Different issue, I think. In my case window get resized, but not below windowMinHeight.

ghost commented 6 years ago

Hey there!

We're automatically closing this issue since there was no activity in this issue since 399 days ago. We therefore assume that the user has lost interest or resolved the problem on their own. Closed issues that remain inactive for a long period may get automatically locked.

Don't worry though; if this is in error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

(Please note that this is an automated comment.)

RussianNeuroMancer commented 6 years ago

Still reproducible, so please keep it open.

ell1e commented 4 years ago

Sorry for making the duplicate issue #8058, but to sum it up: this is also an issue with the PinePhone, and possibly the upcoming Librem 5, Vollafone, and other mobile phones that might run Linux in the future (with systems like Ubuntu Touch, Phosh, or Plasma Mobile)

stale[bot] commented 3 years ago

Hey there!

This issue will be automatically closed in 7 days if there would be no activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

ell1e commented 3 years ago

This is definitely still a problem, and not resolved.

stale[bot] commented 3 years ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

ell1e commented 3 years ago

Still broken.

proycon commented 2 years ago

I see this issue has popped up in several tickets already (#8058, #16368), most of them got closed without an actual solution and with the note that tdesktop wasn't designed for phones/tablets or small screens. I of course respect that the focus is on desktops, but I want to emphasize that in Sxmo (a UI for linux phones like the pinephone), tdesktop really works almost perfectly under Xorg (with dwm as window manager), despite the small screen. I say this to:

1) Request that tdesktop is not completely discarded as a viable solution for linux phones. The experience on Sxmo shows that tdesktop works quite well in general, also in combination with the virtual keyboard and the limited screen estate. 2) Inform that this issue seems wayland specific (and possibly specific to wlr-layer-shell). We're currently developing a wayland version of Sxmo, using sway as compositor, and we can replicate the exact same issue there; the text input field is missing there; and this can also be replicated on a desktop system with a virtual keyboard. The available screen estate to telegram in Xorg vs sway is almost identical and only the latter has the problem. 3) As this issue indicates, it's not limited to mobile devices, I can also replicate it on laptop/desktop with sway with a slightly oversized virtual keyboard. I used our fork of wvkbd, where the height of the keyboard is configurable through a parameter, which it useful for good testing this bug.

I attach of screenshot of tdesktop working well on sxmo (X11, dwm) on a pinephone (may also in part be due to the small size patch alpine linux ships):

sxmo_telegram

ilya-fedin commented 2 years ago

It's unlikely tdesktop will be ever adapted to linux phones by efforts of their team. If you want better support for linux phones (or tablets, transformers, etc, yeah), the only way is to create PRs. You can ask @john-preston which changes in the widgets are needed to decrease minimal window height if you want to work on that.

stale[bot] commented 2 years ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

ell1e commented 2 years ago

:weary:

gurucubano commented 1 year ago

I have a similar issue with one of my Linux mobile phone Purism L5. The one which works fine runs telegram-desktop 3.7.3, the other runs 4.1.1 and there the OSK overlaps the input widget when the OSK is brought up. The problem seems to be that in 4.1.1 the list of older messages in the chat is not shifted upwards enough. See attached screen (two of the correct working 3.7.7m the last of the broken one):

tg373-2022-11-14-124602 tg373-2022-11-14-124637

broken: tg411-2022-11-18-074830

gurucubano commented 1 year ago

Hello @john-preston could you please point me to the location where to change this problem. Thanks

ilya-fedin commented 1 year ago

@john-preston sadly doesn't seem to be interested in resolving this problem. Another way to fix the problem is probably adjusting input fields to QInputMethod::keyboardRectangle (or maybe QInputMethod::inputClipRectangle?). QInputMethod instance can be gotten with QGuiApplication::inputMethod. This should be an easier way to fix that as this doesn't require changing window limits and so working together with Telegram designers, but sadly personally I can't work on this as I don't have any device to reproduce this. But I think I'll be able to help anyone interested to implement this with QInputMethod.

gurucubano commented 1 year ago

El día Dienstag, Dezember 06, 2022 a las 11:52:05 -0800, ilya-fedin escribió:

@john-preston sadly doesn't seem interested in resolving this problem. Another way to fix the problem is probably adjusting input fields to QInputMethod::keyboardRectangle. QInputMethod instance can be gotten with QGuiApplication::inputMethod. This should be an easier way to fix this as this doesn't require changing window limits and so working together with Telegram designers, but sadly personally I can't work on this as I don't have any device to reproduce this. But I think I'll be able to help anyone interested to implement this with QInputMethod.

If some could produce a flatpak pkg for the Purism L5 (Debian), I could give it a try. Actually, I can't compile from sources.

-- Matthias Apitz, ✉ @.***, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub

ilya-fedin commented 1 year ago

The thing is someone having appropriate device and/or interest has to compile from sources and do the development

chloe-everhart commented 1 year ago

Still broken: I use Pop! OS with 200% scaling and the Night Color always turned up most of the way. Telegram is installed as Flatpak through Pop! Shop.

My accessibility options broke the Telegram UI. Using 200% scaling from the GNOME settings menu, the area where I type the messages is off the screen, and I can't shrink the window so it will fit on the screen. I can't get to all the menu options.

When I click the thoughtfully placed icon to switch to 100%, everything gets too small to read easily, but the buttons are back on the page. When I turn off "use system defaults", and use the slider to increase the scale to where reading it is comfortable, the type box and menu options are off the page and inaccessible again.

Could you please help me find a solution, so that Telegram won't get bigger than my monitor when I scale to 250% or 300%?"

ilya-fedin commented 1 year ago

@chloe-everhart there's sadly no solution as tdesktop is just not designed for such small window sizes

WhyNotHugo commented 1 year ago

FWIW, this is also an issue on desktop when I have a another window below Telegram.

I've simply learnt to always give Telegram more space if I want to type on it, but there's nothing phone-specific about the issue (though there's no workaround on a phone).

I'm not sure about X11, but on Wayland this is by design, from xdg_toplevel::set_min_size:

The client should not rely on the compositor to obey the minimum size. The compositor may decide to ignore the values set by the client and request a smaller size.

I understand that you're not talking to Wayland directly, and using Qt as an intermediate, and the problem is that Qt's abstraction promises something different. But FYI, that promise is broken because it is not possible to uphold.

I know on floating desktops a window can be larger than the screen and you can just drag then up and down to see the "off-screen" parts, but there's no such concept on tiling desktops: windows are always rendered in their entirety, never partially and they never overlap. So if there's not enough space, they will be made smaller.

ilya-fedin commented 1 year ago

The problem here is not Qt but the lack of development will in having a re-design that fits smaller screens. Even if tdesktop was talking to Wayland directly, this particular issue would exist as we just can't handle smaller sizes. Qt just makes the life easier by providing the sane guarantees and enforcing the size for us. If it wouldn't, we would patch it to do that (that's something we will likely do for X if this won't be fixed upstream to avoid crashes).

WhyNotHugo commented 1 year ago

I think we're not seeing eye to eye on the "minimum size" issue.

I understand that as part of Telegram's design, you want Telegram's window to always be larger than a minimum size. This expectation can be met on a few specific scenarios (basically, on a stacking compositor/desktop), but it's just unrealistic anywhere else.

On my particular scenario (a tiling compositor), if I want to have a window below Telegram, then the vertical space left for Telegram is less than its minimum height. In such a scenario, how would you enforce a minimum height? There's literally no more pixels left on screen. This isn't about a "small screen" either; my screen is 34" (3440x1400px) but I might want to have something below telegram. See example screenshot:

image

Note that in this specific scenario, it's perfectly feasible to render the chat-history widget smaller; it would still be able to fit plenty of content.

ilya-fedin commented 1 year ago

Note that in this specific scenario, it's perfectly feasible to render the chat-history widget smaller; it would still be able to fit plenty of content.

No doubt it's possible, the problem is there's no development will. Just lowering the limits will lead to visual artifacts what was already proven in the past. The reality is tdesktop needs work from someone interested to fix the widgets to handle such sizes, likely with redesigning various place (there's not only the chat history, but also settings view and etc, etc, etc all of which has to be fixed as well before the limit could be lowered).

but I might want to have something below telegram

tdesktop is just not optimized for such use-case, sorry, but you can't use it like that.

how would you enforce a minimum height?

As it currently does on Wayland: by rendering outside of the window. If you want correct operation, you have to enlarge the window. It's better than crashing, do you agree? And we can't do anything better without massive changes.

but it's just unrealistic anywhere else.

Such use-cases are just unsupported, sorry. You're losing your warranty when bypassing application's requirements.

ilya-fedin commented 1 year ago

Also, as we won't crash anymore, it will also be possible to handle that with a "Please increase your window size" plumb like was proposed in #25539. The question is whether this is something @john-preston would like to have though.

WhyNotHugo commented 1 year ago

The reality is tdesktop needs work from someone interested to fix the widgets to handle such sizes, likely with redesigning various place (there's not only the chat history, but also settings view and etc, etc, etc all of which has to be fixed as well before the limit could be lowered).

C++ is far outside my area of expertise, so I doubt I'll ever be able to contribute that much. Maybe someday someone coming across this issue will have the right skill-sets to address this. :crossed_fingers:

You're losing your warranty when bypassing application's requirements.

What exactly re the requirements? "The window must be at least X size"? :joy:

it will also be possible to handle that with a "Please increase your window size" plumb like was proposed in https://github.com/telegramdesktop/tdesktop/issues/25539. The question is whether this is something @john-preston would like to have though.

I don't really think that this is worth the effort. I'd rather just leave the issue open until someone has the time+skill to address is properly. At least now it works for reading a conversation.

ilya-fedin commented 1 year ago

The window must be at least X size

Yes.

github-actions[bot] commented 11 months ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!

ell1e commented 11 months ago

Can't you mark this as confirmed or something? It won't just "disappear" just because the misguided GitHub action is designed to assume so.

gurucubano commented 11 months ago

El día miércoles, octubre 18, 2023 a las 01:19:39 -0700, Ellie escribió:

Can't you mark this as confirmed or something? It won't just "disappear" just because the misguided GitHub action is designed to assume so.

+1

-- Matthias Apitz, ✉ @.***, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub

Aokromes commented 11 months ago

Can't you mark this as confirmed or something? It won't just "disappear" just because the misguided GitHub action is designed to assume so.

you know, a lot of issues are fixed and forgoten to close related issue, this helps us to find those.

ell1e commented 11 months ago

a lot of issues are fixed and forgoten to close related issue, this helps us to find those.

I see, I guess that makes sense. I just checked on my Linux phone and this bug is definitely not fixed, sadly.

ilya-fedin commented 11 months ago

Note that running on phones is not a goal and is not a reason for the issue to remain open as tdesktop is a desktop client. Only tablet & transformers are valid use-cases. If no one can confirm it's valid for those use-cases anymore then perhaps the issue should be closed.

ell1e commented 11 months ago

Fwiw: 1. there isn't quite a difference of a small Linux tablet and a large Linux phone, the distinction is somewhat arbitrary. 2. maybe a solution would be to make all platforms, including Android/iOS, based on the same codebase? A Linux phone isn't really different to an Android phone either so there's no too strong reason why one would need to be based on Qt but not the other, or a desktop platform would need a fundamentally different code.

ilya-fedin commented 11 months ago

Linux phone is not supposed to run desktop client, it's just not supported at all. The community has to support those devices with their own custom client if they want to use such devices I guess.

ell1e commented 11 months ago

Well, my point was if the code bases weren't separate everything would be accidentally supported now. The work for touch on "desktop'ish" stuff is already done, the work on phone factor UI scaling as well, yet for some reason it just happens to be split up. Qt runs on phones, or so I thought, so I don't quite understand it.

ilya-fedin commented 11 months ago

I don't think this would ever happen, it's much more likely that tdesktop would disappear cause Qt provides the worst experience on modern platforms while native clients provide the best experience.

ilya-fedin commented 11 months ago

the work on phone factor UI scaling as well

That's just false. The inability of the UI to fit smaller sizes is exactly the reason the limit exists.

ell1e commented 11 months ago

There must be a misunderstanding. It works on Android, so obviously it's an already solved problem. Running on Linux with touch is also a solved problem. If the codebases weren't split then we wouldn't be talking about this now since all the work was already done, that is all I was trying to say.

Aokromes commented 11 months ago

it's indeed still bugged on surface tablet.

Aokromes commented 11 months ago

i tried to play a bit with scalling and with 175% system interface and 150% interfaz scalling shows properly. now i don't remember what was the bugged scalling settings xd

Aokromes commented 11 months ago

ok with a fresh install i can reproduce it.

ilya-fedin commented 11 months ago

If the codebases weren't split

The point is this couldn't have happened. The Android client was written before tdesktop and tdesktop was adopted. Even now tdesktop lags behind mobile clients a lot due to the low-levelity of C++, it's considered to provide bad UX for modern native features due to Qt's focus on embedded and it's considered bugged due to lots of bugs in Qt. I don't imagine how other clients could be deprecated in sight of all that but I can imagine tdesktop can get deprecated for Unigram & TelegramSwift as they both provide native UX and their development speed is much faster, their developers are able to implement all features in time

ilya-fedin commented 11 months ago

I also believe Qt had no Android support back in 2013 (the year when tdesktop was created). Heck, it's the year when Electron was created, so tdesktop couldn't have been written in Electron either (but it 100% would be if it was started now).

ell1e commented 11 months ago

For what it's worth, Electron stuff runs horribly on my phone. So that would have been in practice even worse. But there's e.g. also dart and flutter. I hope one day this can be solved such that everything works on all devices of all sizes.

ilya-fedin commented 11 months ago

Running on phones is not a goal for a desktop client and Electron is perfect for desktops

ilya-fedin commented 11 months ago

I hope one day this can be solved such that everything works on all devices of all sizes

Don't hope, native clients without using frameworks are likely to be always preferred by Telegram. That was a requirement in all contests so far (Telegram X for Android, the web clients).

ell1e commented 11 months ago

Okay, but that wouldn't unify it at all, since Electron isn't good for phones. Even for desktop, it runs pretty laggy and badly for me. I'm merely saying it would be great if it was unified.

ilya-fedin commented 11 months ago

Yeah, that's the point, I don't understand why do you think codebase unifying is a goal. It's very much the other way around: internal competition is welcome as you can see and native solutions are likely to replace cross-platform ones. That's perhaps bad for Linux due to the low market share, it can lose official support.

ell1e commented 11 months ago

Unifying the code bases is useful because then issues like this one don't crop up. If you separate features per device and ecosystem based on how that device usually looks like (but not always!) you end up with scattered stuff locked away that would actually be useful everywhere.