$30 off During Our Annual Pro Sale. View Details »

Resurrecting Personasfor LibreOffice

Resurrecting Personasfor LibreOffice

My talk during FOSDEM 2019.

Past, present, and the future of LibreOffice's Personalization dialog.

LibreOffice has had the ability to use Mozilla Themes (Personas) for some time (Tools > Options > Personalization); but it kept breaking all the time, and never had an acceptable UX. Also tons of errors/warnings, and very slow search and apply processes almost brought it to the point of being killed for good. But I couldn’t let it die, started looking into the related code and the bug reports. Now it has a better UX/UI, and got most annoying bugs/crashers fixed, and is much faster.

I will try to present a summary about the journey so far, and the plans for the future.

Muhammet Kara

February 02, 2019
Tweet

More Decks by Muhammet Kara

Other Decks in Technology

Transcript

  1. Collabora Productivity www.collaboraoffice.co
    Collabora Productivity
    Resurrecting Personas
    for LibreOffice
    By Muhammet Kara
    Consultant Software Engineer at
    Collabora Productivity
    @muhamm3tkara

    View Slide

  2. Collabora Productivity www.collaboraoffice.co
    Muhammet Kara
    Work

    Working on the core & UI

    Since Dec 2018

    Was @Pardus project before
    Community

    LibreOffice certified developer

    Long-time GNOME contributor

    Member of The Document Foundation & the GNOME
    Foundation

    View Slide

  3. Collabora Productivity www.collaboraoffice.co
    Mozilla Themes, aka Personas
    Tools > Options > Personalization > Load Firefox theme

    Allows applying Mozilla Firefox themes on LibreOffice

    Can select a pre-installed theme

    Can search online for new ones

    Changes background of main menus, and toolbars

    Relies heavily on Mozilla add-ons API & web content

    View Slide

  4. Collabora Productivity www.collaboraoffice.co
    Past
    Some of the issues

    Performance & reliability issues

    Error-prone

    Unrelated/incomplete categories

    Getting broken & fixed every now and then

    Simply not working / is practically dead

    View Slide

  5. Collabora Productivity www.collaboraoffice.co
    Performance & Reliability Issues

    ~40 seconds to search for a keyword

    Fetching whole html pages

    Relying on the design & content of the html (easily broken)

    Multiple & repetitive string searches

    Overwriting existing data every time

    Using unreliable lib for download

    View Slide

  6. Collabora Productivity www.collaboraoffice.co
    Categories

    15 on Mozilla & only 6 on LibreOffice

    There is no LibreOffice category

    Not even actual categories!

    View Slide

  7. Collabora Productivity www.collaboraoffice.co
    Fetch/Download Reliability

    On preview and whole theme downloads

    Causing multiple/duplicate bug reports

    Why?

    View Slide

  8. Show me some code!

    View Slide

  9. Collabora Productivity www.collaboraoffice.co
    HTML Parsing with String Search

    View Slide

  10. Collabora Productivity www.collaboraoffice.co
    What Could Go Wrong?

    View Slide

  11. Collabora Productivity www.collaboraoffice.co
    I want it fresh!

    View Slide

  12. Collabora Productivity www.collaboraoffice.co
    What categories?

    View Slide

  13. Collabora Productivity www.collaboraoffice.co
    Dilemma
    Keep it

    Little, cute feature

    Adds personal touch

    “My own” feeling

    Thousands of choices

    Users & designers chasing

    We have a history!
    Kill it

    Gets broken all the time

    Needs to chase Moz API &
    Web Design changes

    Users & designers chasing

    Headacke for QA

    No developer to maintain

    View Slide

  14. Collabora Productivity www.collaboraoffice.co
    We have a history!

    View Slide

  15. Collabora Productivity www.collaboraoffice.co
    Too cute to be killed!

    View Slide

  16. Collabora Productivity www.collaboraoffice.co
    We have a mission now!

    Fix the current implementation

    Improve the mechanism under-the-hood

    Switch to the new API

    Make visual inprovements

    View Slide

  17. Collabora Productivity www.collaboraoffice.co
    Make it work again

    View Slide

  18. Collabora Productivity www.collaboraoffice.co
    Progress
    Improve the under-the-hood & switch

    Do not crash when there are more default personas than
    intended

    Use slug instead of name to store Personas

    Make use of the already defined constants for personas

    tdf#60543: Remember the URL of the currently applied persona

    Ensure settings consistency for default personas

    Separate persona download thread

    Do not re-download the already existing images

    Modernize personas under-the-hood - The search

    View Slide

  19. Collabora Productivity www.collaboraoffice.co
    Progress (continue...)
    Improve the under-the-hood & switch (continue...)

    tdf#101629: Handle invalid urls and search strings for Personas

    tdf#99776: Preload a persona category initially

    tdf#120506: Get rid of unnecessary accentcolor parsing for
    personas

    Use curl while getting the actual persona

    Increase number of default personas to 6

    View Slide

  20. Collabora Productivity www.collaboraoffice.co
    Progress (continue...)
    Visual / additional improvements

    tdf#120475: Sync persona categories with Mozilla

    tdf#120746: Show the name of the persona as tooltip in the
    search results

    Towards solving tdf#120747: Remember the preview file of
    persona

    tdf#120743: Rename the 'Select Theme' button to clarify

    ...

    View Slide

  21. Collabora Productivity www.collaboraoffice.co
    And now?

    Works more fluently

    Caches downloaded files & doesn’t overwrite

    A search from ~40 seconds down to ~3 seconds

    Easier to extend & improve

    View Slide

  22. Collabora Productivity www.collaboraoffice.co
    Meta Bug

    View Slide

  23. Collabora Productivity www.collaboraoffice.co
    Look & Feel

    View Slide

  24. Collabora Productivity www.collaboraoffice.co
    Look & Feel

    View Slide

  25. What’s Next?

    View Slide

  26. Collabora Productivity
    Thank you!
    By Muhammet Kara
    @muhamm3tkara
    [email protected]
    https://muhammetkara.com

    View Slide