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

Include some hints in the "Priority" label (bsc#1154693) #482

Merged
merged 2 commits into from
Aug 23, 2021

Conversation

lslezak
Copy link
Member

@lslezak lslezak commented Oct 22, 2019

The Problem

  • The meaning of the "Priority" field in the repository manager is a bit misleading
  • The higher number the lower priority - that's quite unexpected and confusing (that was inherited from the yum package manager)
  • https://bugzilla.suse.com/show_bug.cgi?id=1154693

Solution

  • Add a hint to the widget label if the terminal is wide enough (so there is space for it)
  • I was thinking what to use there, the longer version is used only on larger terminals, but a too long label still might not fit.
  • One option was to use something like "the higher number the lower priority" but then I was afraid that some translations would be too long. So I decided to use "higher number = lower priority" which is grammatically not that nice but indicates to the translators that they should use some shorter version.

Screenshots

(I deliberately installed the French translations as they are usually longer.)

Small window (80x25), the short label is used (cough, cough, it already fits so so...):
repo_priority_short

Larger window, the new longer label is used (obviously not translated yet):
repo_priority_long

In GUI it always uses the longer version, there should be almost always enough space (this is in 800x600):
repo_priority_qt

  • 4.2.31

@lslezak lslezak requested a review from mvidner October 22, 2019 14:28
@lslezak
Copy link
Member Author

lslezak commented Oct 22, 2019

@mvidner What do you think about this label? Is it OK? Or any better suggestion?

@mvidner
Copy link
Member

mvidner commented Oct 23, 2019

It's hard, I don't see a way to make it obvious and unmistakable. Let's see how the world sees "priority"

@mvidner
Copy link
Member

mvidner commented Oct 23, 2019

You have missed an important aspect of the bug report: the priority changing widget is an IntField which has arrows: an up arrow raises the number, which lowers the priority. That contributes to the confusion.
IMHO we should replace the widget with an editable combo box, with values

  • "1 (high)"
  • "50 (medium)"
  • "99 (low, default)"

@lslezak
Copy link
Member Author

lslezak commented Oct 25, 2019

An editable combo box looks like an interesting alternative... I'll check that later.

@rindeal
Copy link

rindeal commented Mar 31, 2020

How about renaming "Priority" field to "Weight"?

@mvidner
Copy link
Member

mvidner commented Oct 2, 2020

BTW on Leap 15.2, "zypper addrepo ..." tells me

Repository priorities are without effect. All enabled repositories share the same priority.

@mvidner
Copy link
Member

mvidner commented Oct 2, 2020

Ah, now I understand!

I have interpreted "Repository priorities are without effect." as "the priority feature is gone, zypp ignores whatever priority you specify", but the source code and the following example show that it in fact means "the currently enabled repositories happen to share the same priority, so I am confusing you with superfluous information. If you add a repo with a different priority I will remind you too which will be much more useful."

# LANG=C z ar -p 50 /tmp tmp50
Adding repository 'tmp50' ...............................................[done]
Repository 'tmp50' successfully added

URI         : dir:/tmp
Enabled     : Yes
GPG Check   : Yes
Autorefresh : No
Priority    : 50 (raised priority)

Repository priorities in effect:                (See 'zypper lr -P' for details)
      50 (raised priority)  :  1 repository
      99 (default priority) : 13 repositories

@dgdavid
Copy link
Member

dgdavid commented Jul 28, 2021

@lslezak, @mvidner,

What is the status of this PR? Despite the conflicting files, it looks almost finished, am I wrong?

@lslezak
Copy link
Member Author

lslezak commented Aug 23, 2021

Um, it's basically just waiting for the @mvidner 's approval.

Copy link
Member

@mvidner mvidner left a comment

Choose a reason for hiding this comment

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

Thanks, this is an easy improvement

@lslezak lslezak merged commit 4c2f9c5 into master Aug 23, 2021
@lslezak lslezak deleted the priority_label branch August 23, 2021 13:36
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 35.344% when pulling c624a8b on priority_label into f620fe9 on master.

@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #158 successfully finished
✔️ Created OBS submit request #913781

@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #86 successfully finished
✔️ Created IBS submit request #248712

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.

None yet

6 participants