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

AppData Description gets rendered out of order #116

Closed
tintou opened this issue Jun 8, 2017 · 8 comments
Closed

AppData Description gets rendered out of order #116

tintou opened this issue Jun 8, 2017 · 8 comments
Assignees

Comments

@tintou
Copy link
Contributor

tintou commented Jun 8, 2017

from elementary/appcenter#333
The description of my app has a paragraph block followed by an unordered list, followed by another paragraph. The unordered list somehow gets rendered below the two paragraphs in AppCenter.

My description looks like this:

<description> <p> Agenda is a simple, slick, speedy and no-nonsense task manager. Use it to keep track of the tasks that matter most. </p> <ul> <li>Blazingly fast and light</li> <li>Remembers your list until you clear completed tasks</li> <li>Autocompletion for previously added tasks</li> <li>Quit with the Esc key</li> </ul> <p> I dare you to find an easier, faster, more beautiful task manager for elementary OS. </p> </description>

AppCenter looks like this:

appcenterissue

@hughsie
Copy link
Collaborator

hughsie commented Jun 8, 2017

Looks like valid markup to me. I assume appstream-glib does the right thing?

@ximion
Copy link
Owner

ximion commented Jun 8, 2017

I guess this is because of the "release descriptions can start with an enumeration" patch that was recently applied to your packaging.

I need to rewrite that particular code anyway, so consider this fixed for the next release (which is where the patch that broke it is from anyway ^^).
The markup is completely fine, no issues there - it's just the parser that is a bit dumb in current Git master.

@ximion ximion added the bug label Jun 8, 2017
@ximion ximion self-assigned this Jun 8, 2017
@ximion
Copy link
Owner

ximion commented Jul 1, 2017

Okay, I tried multiple things now, I even added a new testcase dedicated to this bug, but I could not reproduce this. The XML is always parsed correctly in any form, the YAML output matches the expectations as well, and I see no other way this could possibly fail.

The only possibility remaining is that the appstream-generator interferes (unlikely, it doesn't touch the description when the metainfo file defines one) or that the patch you applied to AppStream in Elementary to fix the "description can't start with enumeration" bug somehow doesn't work as expected on the older AppStream version.

@ximion
Copy link
Owner

ximion commented Jul 1, 2017

It's also not a bug in the built-in simple markup rendering function.
So yeah, this is either an issue in AppCenter, appstream-generator or in their interplay with libappstream.

Can you maybe update both appstream-generator and AppStream on your server to the newest version, and then tell it to re-scan the affected package?

@ximion ximion added incomplete and removed bug labels Jul 2, 2017
@ximion
Copy link
Owner

ximion commented Aug 30, 2017

I'm closing this, because I can still not reproduce it. Please reopen this report, in case the bug is still happening.

@ximion ximion closed this as completed Aug 30, 2017
@cassidyjames
Copy link

cassidyjames commented Feb 7, 2018

I just had this happen with an app in elementary OS as well. Not sure where exactly the issue is, but I was pointed here.

My AppStream description is:

https://github.com/cassidyjames/dippi/blob/b27291377cc0c9350f28b5a00c3bf8885dafffd2/data/com.github.cassidyjames.dippi.appdata.xml.in#L9-L35

On my machine, however, dumping the appstream data gives me

<description>
  <p xml:lang="en_US">Analyze any display. Input a few simple details and figure out the aspect ratio, DPI, and other details of a particular display. Great for deciding which laptop or external monitor to purchase, and if it would be considered HiDPI.</p>
  <p xml:lang="en_US">Handy features:</p>
  <p xml:lang="en_US">Based on the expertise of Cassidy James Blaede and the actual logic System76 uses to determine screen size and resolution combinations.</p>
  <p xml:lang="en_US">Tells you if a display‘s density is:</p>
  <p xml:lang="en_US">Special thanks:</p>
  <ul>
    <li xml:lang="en_US">Find out if a display is a good choice based on its size and resolution</li>
    <li xml:lang="en_US">Get advice about different densities</li>
    <li xml:lang="en_US">Differentiates between laptops and desktop displays</li>
    <li xml:lang="en_US">Stupid simple: all in a cute li'l window</li>
  </ul>
  <ul>
    <li xml:lang="en_US">Very Low DPI,</li>
    <li xml:lang="en_US">Fairly Low DPI,</li>
    <li xml:lang="en_US">Ideal for LoDPI,</li>
    <li xml:lang="en_US">Potentially Problematic,</li>
    <li xml:lang="en_US">Ideal for HiDPI,</li>
    <li xml:lang="en_US">Fairly High for HiDPI, or</li>
    <li xml:lang="en_US">Too High DPI</li>
  </ul>
  <ul>
    <li xml:lang="en_US">Micah Ilbery for the shiny icons!</li>
    <li xml:lang="en_US">Daniel Foré for his apps to use as code examples</li>
    <li xml:lang="en_US">David Jordan for helping determine DPI ranges</li>
  </ul>
</description>

The XML is validated with appstreamcli validate at build time and passes.

@ximion
Copy link
Owner

ximion commented Feb 8, 2018

Which version of AppStream do you have? (appstreamcli --version)

@cassidyjames
Copy link

I'm not sure what the version on the server is, but it turns out this was an issue with a related parsing process in Houston that has been fixed. Sorry for the bother!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants