Add ellipsis where appropriate
ClosedPublic

Authored by nicolasfella on May 27 2018, 3:33 PM.

Details

Summary

Add ellipsis to actions that open up a dialog. It doesn't seem to work for Twitter, probably because it's different to the other plugins.

Diff Detail

Repository
R495 Purpose Library
Branch
ellipsis
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13150
Build 13168: arc lint + arc unit
nicolasfella created this revision.May 27 2018, 3:33 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 27 2018, 3:33 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
nicolasfella requested review of this revision.May 27 2018, 3:33 PM
ngraham accepted this revision.May 27 2018, 3:39 PM
This revision is now accepted and ready to land.May 27 2018, 3:39 PM
apol requested changes to this revision.May 27 2018, 10:07 PM

That's not correct. This is the plugin name. If you want elipsis add it onto the model's displayrole.

This revision now requires changes to proceed.May 27 2018, 10:07 PM

It's done this way in Email, KTP and KDE Connect already. If we add the ellipsis in AlternativesModel's DisplayRole we get it on every entry, even if it would be inappropriate.

apol added a comment.May 27 2018, 10:35 PM

It's done this way in Email, KTP and KDE Connect already. If we add the ellipsis in AlternativesModel's DisplayRole we get it on every entry, even if it would be inappropriate.

In which cases would it be inappropriate?

Quote from VDG:
If there will be further user input needed and a dialogue or similar popping up for it: needs ellipsis

Therefore Pastebin would not need one, but I guess this is neglectable

Move ellipsis from plugin name to menu

ngraham requested changes to this revision.Mar 10 2019, 5:08 AM

This results in every item in the menu getting an ellipsis, which isn't appropriate because not all of them require more user action to proceed (the imgur plugin is one such example). It seems like we need a way to indicate in the desktop file that the plugin will require user interaction and need an ellipsis displayed in the UI, without hardcoding that information with an ellipsis in the plugin's own name.

This revision now requires changes to proceed.Mar 10 2019, 5:08 AM

This results in every item in the menu getting an ellipsis, which isn't appropriate because not all of them require more user action to proceed (the imgur plugin is one such example). It seems like we need a way to indicate in the desktop file that the plugin will require user interaction and need an ellipsis displayed in the UI, without hardcoding that information with an ellipsis in the plugin's own name.

This sounds like a hack as well. I think we need another translatable field in JSON, independent from "Name".

Here is a similar problem with KIO: https://bugs.kde.org/show_bug.cgi?id=243287

Implement Alexander's suggestion

nicolasfella planned changes to this revision.Jun 22 2019, 12:42 PM
nicolasfella requested review of this revision.

This resolves the issue that the name with ellipsis shows up in the dialog title

Looks like a couple of strings are now blank:

We probably need to fall back to "%1..." if X-Purpose-Action is not defined, which is possible for 3rd-party plugins.

  • fall back to name
ngraham accepted this revision.Jun 22 2019, 2:04 PM
apol added a comment.Jun 23 2019, 9:18 AM

X-Purpose-Action won't get translations.

  • rename role
  • add file for extra translations
apol accepted this revision.Jun 23 2019, 10:52 AM
This revision is now accepted and ready to land.Jun 23 2019, 10:52 AM
This revision was automatically updated to reflect the committed changes.