[Bug 691572] New: Formatting Package Descriptions
https://bugzilla.novell.com/show_bug.cgi?id=691572 https://bugzilla.novell.com/show_bug.cgi?id=691572#c0 Summary: Formatting Package Descriptions Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Installation AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: ke@novell.com QAContact: jsrain@novell.com Found By: Documentation Blocker: --- Long package descriptions are hard to read, because they lack structuring. See attachment (it is the same with the graphical yast). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c1
--- Comment #1 from Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c2
Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c3
--- Comment #3 from Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c
zj jia
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c4
Steffen Winterfeldt
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c5
Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c6
Steffen Winterfeldt
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c7
Thomas Göttlicher
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c8
Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c9
--- Comment #9 from Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c10
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c11
Thomas Göttlicher
The problem with "<small><tt>" tags is reported in bnc #605113. The tags should be removed in PDB.
I am not sure who is responsible for formatting the patch descriptions nicely. Thomas, what do you think?
I talked to Marcus Meißner. Patch descriptions are formatted as plain text. I guess the tags make the package selector believe it's rich text. Which leads to ignored line breaks. Removing these tags as requested in bug 605113 could solve the line break issue as a side effect. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c12
--- Comment #12 from Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c13
Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c14
--- Comment #14 from Karl Eichwalder
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c15
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c16
--- Comment #16 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c17
--- Comment #17 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c18
--- Comment #18 from Gabriele Mohr
- for SLES licenses:
- for SLES license AND package description
pdb
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
From 'pdb' guide line: empty lines will be <p> tags. In a list environment, empty lines end the
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c19
--- Comment #19 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c20
--- Comment #20 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c21
--- Comment #21 from Thomas Göttlicher
I have changed the guide lines for package descriptions on pdb (http://pdb.suse.de/doc/user/descriptions.html#pdb_attributes_descriptions_fo...):
A limitation to 70 characters for the line length (due to limited size of description window in text mode YaST ) is not necessary any longer. Like the Qt front end, also the ncurses package selector creates simple html text from the plain description (available in Factory since March 2012).
Please respect these rules: Empty lines result in paragraphs. In a list environment, empty lines end the list. Linebreaks result in a single space, that means that a line break has no special effect. A not numbered list environment starts with a line that starts with an asterix or a minus sign followed by at least one white space. A line which continues a list item starts with at least two whitespaces.
The Qt package selector is also enhanced to show not numbered lists nicely (empty lines are already interpreted). The Qt part is fixed in yast2-qt-pkg version 2.21.19.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c22
--- Comment #22 from Gabriele Mohr
I have changed the guide lines for package descriptions on pdb (http://pdb.suse.de/doc/user/descriptions.html#pdb_attributes_descriptions_fo...):
Totally WRONG - I haven't changed anything on pdb but took parts of the pdb guide lines and entered it in openSUSE wiki: see http://en.opensuse.org/openSUSE:Specfile_guidelines#Description -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c23
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c24
--- Comment #24 from Gabriele Mohr
I suggest to take these guide lines also for the patch descriptions.
- Empty lines result in paragraphs. In a list environment, empty lines end the list. Linebreaks result in a single space, that means that a line break has no special effect. - A not numbered list environment starts with a line that starts with an asterix or a minus sign followed by at least one white space. - A line which continues a list item starts with at least two whitespaces.
They should be added to SWAMP info text for 'DESCRIPTION'. Thomas (tschmidt and tgoettlicher), do you agree?
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c25
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c26
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c27
Thomas Schmidt
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c29
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c30
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c31
--- Comment #31 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c32
Dirk Mueller
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c33
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c34
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c35
--- Comment #35 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c36
Duncan Mac-Vicar
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c37
--- Comment #37 from Thomas Göttlicher
Now, IIRC, the Qt selector does not use the libyui widget, but the ncurses one does, right? The Qt package selector uses QTextBrowser and does itself some rich text magic.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c38
--- Comment #38 from Gabriele Mohr
I don't think libzypp is the right place for this. But also not the job of the concrete UI implementations.
Giving the fact that our current YRichText::setText() implementation assumes you are giving (simplified) HTML (unless setTextMode() is enabled) I would keep the magic in this area. Therefore libyui currently assumes that a concrete UI Foo implementation is handling HTML in FooRichText. I agree, libyui is the right place to add a markdown parser.
I would add a C/C++ markdown parser to libyui, and modify setText so that if <!-- DT:Rich --> is found at the beginning then the text is set "as is" (assumed HTML). We can detect it in other ways as well. Also, AFAIK, html is valid markdown, so we could just process the text always.
Currently the <!-- DT:Rich --> tag is not used in YaST (YCP code) to indicate html text, i.e. we have to detect html in another way.
If not, we assume it is markdown, and process the text.
The disadvantage of having the conversion in YRichText::setText() is that not all text passed to it IS written in markdown syntax (e.g. licenses). I propose to add a method createHmtlText() which can be called only if needed, e.g. in ncurses package selector for package and patch descriptions. Disadvantage of this approach is, of course that's not available from YCP.
We need to verify that ncurses can cope with the markdown parser HTML output, or at least it can ignore the unknown tags. This should be OK.
If setTextMode is enabled and the text does not contain <!-- DT:Rich --> then we set the text unprocessed.
Now, IIRC, the Qt selector does not use the libyui widget, but the ncurses one does, right?
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c39
--- Comment #39 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c40
--- Comment #40 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c41
--- Comment #41 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c42
--- Comment #42 from Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c43
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c44
Thomas Göttlicher
Thomas, do you suggest another (better) way to integrate the markdown parser? I like the way how the markdown parser is integrated.
And could you please check whether linking of boost_regex is desired or has any disadvantages. There are some regexp functions in libzypp that do not need the boost library. Copying these functions to the libyui code would prevent us from adding new library dependencies. Michael Andres can tell you details about these libyzpp regexp functions.
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c45
Gabriele Mohr
https://bugzilla.novell.com/show_bug.cgi?id=691572
https://bugzilla.novell.com/show_bug.cgi?id=691572#c46
Michael Andres
participants (1)
-
bugzilla_noreply@novell.com