[Sugar-devel] Updates: Python3 app store (aslov4)

James Cameron quozl at laptop.org
Mon Apr 27 03:44:50 EDT 2020


On Sun, Apr 26, 2020 at 06:21:04AM +0200, sugar at radii.dev wrote:
> Thanks a lot! for the feedback. I have indented info.json file as
> well and linted python files using flake8 (except some
> false-positives & block comment remarks). I will address rest of the
> feedback when I will be working on project next time.
> 
>     The Browse activity in Sugar uses WebKit as an embedded browser, so
>     that's the browser that will be used most. Please add that to your
>     test process.
> 
> I am testing with Browse activity, thanks for informing itโ€™s using WebKit
> engine. So, that means testing it with Epiphany browser in lieu of WebKit
> itself should also work?

Only for testing for appearance regressions.  Browse has the Sugar
version user agent value, and Epiphany does not.  If you really need
to test with Epiphany for some reason, fork and change the user agent
to match.

Browse also has specific handling of the download bundle, along with
alert messages relating to that download.  You should test that so you
know the user experience and can use wording that mirrors concepts.

It is important to test a whole system in the configuration it would
be used.

The number of users accessing an app store from a non-Sugar system
should be trivial.

>     Copyright; please add your copyright to main.py.
> 
>     License; please add a license grant after your copyright in main.py;
>     you have included AGPLv3 as a file, but have not followed the section
>     "How to Apply These Terms to Your New Programs".
> 
> Yes, copyright & license is in To-Do list on README.md. It will be addressed
> next time.
> 
>     User experience; the per-activity page seems redundant; there's no
>     additional information, and so the download link could have been
>     included in the search results instead of a link to the per-activity
>     page.
> 
> I plan on adding detailed description and gallery parts in activity page
> besides activity details specified in requirements. Where available, these can
> be sourced from aslo. Activities page will also serve for possible future
> extensions such as adding rating & reviews. But yeah, there should be direct
> install/download button on search page.
> 
> UI of prototype is just for demonstration of search functionality. Exact
> presentation of information and UI design will be worked on but search results
> might be displayed something like:
> 
> [ ICON] Activity Name
> Summary if exists, else if Description if exists,  else if first 50 words/5
> sentences of detailed description if exists, else nothing
> TAG1, TAG2, TAG3
> [Install/download button w/ version no. underneath it]
> 
> There would be no Summary, Description or Tags heading. This is just for
> letting know in demo what is the source of information.
> 
>     Show the version of the activity.
> 
>     Draw icons on a white background.
> 
>     Bundle files should include a version number, so that if they are
>     downloaded they do not get renamed by browsers.
> 
>     Bundle files could be hard linked instead of copied. This will be
>     faster.
> 
> Got it ๐Ÿ‘
> 
>     Tags could be sent through an initial uppercase filter.
> 
> Tags should be shown in ALL CAPS?

No.  Initial uppercase.  str.capitalize().  In my test I noted at
least one activity that had two tags; "Language" and "language", and
another activity that had "Language".  Without a case-blind
comparison, the tags are not as useful.  You could either use
case-blind comparison, conversion to lowercase (str.lower), conversion
to uppercase (str.upper), or conversion to initial uppercase
(str.capitalize).

>     A view by unique tags.
> 
> Option to filter result by tags? Awesome idea. Will do it.
> 
> Waiting for more through feedback as you get time.
> 
> Regards,
> Manish
> 
> Apr 25, 2020, 11:12 by quozl at laptop.org:
> 
>     Thanks. Looks good so far. I've tested it on an OLPC server using
>     OLPC OS 20.04, which is based on Ubuntu 20.04 and Sugar 0.117, and I'm
>     able to search, download and use activities.
> 
>     The Browse activity in Sugar uses WebKit as an embedded browser, so
>     that's the browser that will be used most. Please add that to your
>     test process.
> 
>     Copyright; please add your copyright to main.py.
> 
>     License; please add a license grant after your copyright in main.py;
>     you have included AGPLv3 as a file, but have not followed the section
>     "How to Apply These Terms to Your New Programs".
> 
>     Coding style; please use flake8; it will speed review.
> 
>     User experience; the per-activity page seems redundant; there's no
>     additional information, and so the download link could have been
>     included in the search results instead of a link to the per-activity
>     page.
> 
>     Show the version of the activity.
> 
>     Draw icons on a white background.
> 
>     Bundle files should include a version number, so that if they are
>     downloaded they do not get renamed by browsers.
> 
>     Bundle files could be hard linked instead of copied. This will be
>     faster.
> 
>     The JSON could be indented.
> 
>     Tags could be sent through an initial uppercase filter.
> 
>     A view by unique tags.
> 
>     I'll look further at these ideas next week.
> 
>     On Fri, Apr 24, 2020 at 11:13:10PM +0200, sugar at radii.dev wrote:
> 
>         Hello everyone,
> 
>         I have prepared prototype for:
>         a) client-side search engine which work even when html file is opened
>         in
>         browser (without any localhost server). Browsers now (Firefox since
>         v68)
>         restrict any direct calls requesting files (index) if html file is
>         opened from
>         local drive. So, only option is to load index every time by including
>         src in
>         page html. However defer its loading so that it doesn't slow page
>         loading. Once
>         page is loaded than index can load in background.
> 
>         b) script to generate website using website template and activity
>         bundles
>         directory i.e. method to build index and activity page, extract
>         activity icon
>         and copy activity bundle to website.
> 
>         A demo of it is available at: [1]https://activities.radii.page/
>         Repository is available at: [2]https://github.com/free-libre-software/
>         sugarappstore and [3]https://radii.dev/sugarlabs/appstore
> 
>         Further information such as how to use and design choices are available
>         in
>         repository's README.md page. Please read through it.Also, please review
>         code
>         (even though its rough for prototype) and give feedback. If any
>         significant
>         change need to be made with coding such as coding style, structuring
>         etc. than
>         now is a good time to let me know.
> 
>         I request everyone to download repo, try and give your feedback. It
>         should not
>         take more than 10 mins to test if you already have lots of activity
>         bundles.
>         Anyone who wish to do code contribution is welcomed. The faster we are
>         able to
>         build, the sooner people can use it.
> 
>         I have few suggestions for aslo (activities.sugarlabs.com). I will try
>         to raise
>         issue on its repository if I get some time available. Otherwise, I will
>         directly send pull request when free. Issues are very simple. So, if
>         someone
>         wants to take initiative than please do:
>         1) Redirect http -> https version where browser supports
>         2) Since Fedora 32 SoaS final version is about to be released which
>         will not
>         support python2 activities, we need to redirect them to new app store
>         (when
>         basic functionalities built). also uses Apache server as backend and
>         here are
>         three different scenarios to choose from:
>         a) (good) redirect only users landing at home page to new website by
>         editing .htaccess file in directory
>         b) (Best) a) + redirect per activity bases as well to activity page on
>         new
>         website
>         c) (bad) redirect users from all pages to home page of new app store.
>         Will
>         require editing virtual host config in Apache.
>         3) Activities download over http even when on https page. At least
>         download
>         links are not hard coded to http urls. So, it could be somewhere in the
>         backend
>         code. Some other urls are hard coded though. If its static website (I
>         doubt)
>         than we can write simple script to convert all http url to protocol
>         unspecified
>         or https based on some logic (for eg. not all external links can be
>         directed to
>         https like what if some website do not support https).
> 
>         I will not be contributing next week as I have few school due dates in
>         coming
>         days and I have to work on improving them. So, you can expect next
>         update on
>         weekend after that.
> 
>         Regards,
>         Manish
> 
>         References:
> 
>         [1] https://activities.radii.page/
>         [2] https://github.com/free-libre-software/sugarappstore
>         [3] https://radii.dev/sugarlabs/appstore
> 
>         _______________________________________________
>         Sugar-devel mailing list
>         Sugar-devel at lists.sugarlabs.org
>         http://lists.sugarlabs.org/listinfo/sugar-devel
> 
>     --
>     James Cameron
>     http://quozl.netrek.org/
> 

-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list