Opened 15 years ago

Closed 15 years ago

#903 closed enhancement (fixed)

Read Etexts-11, remove the book results split view after a download

Reported by: garycmartin Owned by: jdsimmons
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Read Etexts Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Resolved

Description

Thanks! built in book search/download is a great new feature, makes getting ebook content much simpler.

Feedback: When first used, I was a little confused how to get rid of the book search results after I had downloaded my first book (I wanted to read but 50% of the screen was still consumed by search results). I was then caught out by trying to download several more books in the same activity instance (as the search results are still visible/accessible) with the expectation that each would create a Journal entry - after searching and downloading several texts I realised each is not added to the Journal, just replaces current instance content.

Suggestion would be that the search/download results could auto hide after a book is successfully downloaded, or, if you expect users to search and browse through a few results before sticking with one, allow the results to be hidden via some method (see below).

When trying to get the results list to 'go away', I tried:

1). clearing the book search text input field (nice little (x) for clearing search as in other Sugar UI search areas would be great)

2). then I tried trying to drag the split view out of the way, but seems to be a fixed layout

3). then I tried looking for a toolbar button that might hide/reveal the search results list

4). finally I tried stopping, and then resuming the book Journal entry (which is the current correct solution)

Change History (8)

comment:1 follow-up: Changed 15 years ago by jdsimmons

In the Help text (with the Groucho Marx quote) I suggest using the "Keep" button after each download to create a Journal entry. I also say that you can use the "Escape" key to remove the results table from the screen and start reading. The thing is, if you do use "Keep" you can download a whole lot of books in one session. Much faster than limiting you to one per session. So my position is:

1). It works the way you want it to if you read the instructions.

2). The instructions are the very first thing you see when you open the Activity.

I understand that people don't read instructions. So, my question would be:

Is there any way to automatically do a "Keep" after each download?

I'm thinking that maybe I need to put some kind of close button on my results table. That I can probably figure out how to do.

The "split view" isn't. I tried using a split view but found it impossible to control the position of the splitter. I use a VBox, which automatically divides up the screen evenly.

comment:2 Changed 15 years ago by walter

Something along the lines of this should let you save after each download...

"""
Save instance to Journal
"""
def jobject_new_patch(self):

oldj = self._jobject
self._jobject = datastore.create()
self._jobject.metadatatitle? = oldj.metadatatitle?
self._jobject.metadatatitle_set_by_user? = \

oldj.metadatatitle_set_by_user?

self._jobject.metadataactivity? = self.get_service_name()
self._jobject.metadataactivity_id? = self.get_id()
self._jobject.metadatakeep? = '0'
# Is this the correct syntax for saving the buddies list?
self._jobject.metadatabuddies? = self.tw.buddies
self._jobject.metadatapreview? =
self._jobject.metadataicon-color? = profile.get_color().to_string()
self._jobject.file_path =

datastore.write(self._jobject,

reply_handler=self._internal_jobject_create_cb,
error_handler=self._internal_jobject_error_cb)

self._jobject.destroy()

comment:3 in reply to: ↑ 1 Changed 15 years ago by garycmartin

Replying to jdsimmons:

In the Help text (with the Groucho Marx quote) I suggest using the "Keep" button after each download to create a Journal entry. I also say that you can use the "Escape" key to remove the results table from the screen and start reading. The thing is, if you do use "Keep" you can download a whole lot of books in one session. Much faster than limiting you to one per session. So my position is:

1). It works the way you want it to if you read the instructions.

Fair point, I did read about 30% of text before getting bored, I'm guessing most others will do the same :-)

2). The instructions are the very first thing you see when you open the Activity.

I understand that people don't read instructions. So, my question would be:

Is there any way to automatically do a "Keep" after each download?

Yes see Walter's example (Record is another working example in that each photo/video/audio recording ends up as a separate Journal entry).

Be careful with Keep... Think of it working somewhat like a commit in a CVS on the same file. All the Journal entries, though separate, will have the same activity ID. This has some wierd side effects if you think of the entries you've created with Keep as separate work. You can only have 1 of them resumed at a time (try it... when you resume a different book you've Kept, it will just switch you the instance you have already running). I once did a whole bunch of work (about 20 lesson plan examples) in TurtleArt using Keep and then reworking the tiles and then keep again. Boy did I later get in a mess trying to resume earlier ones to reuse some code (ended up running and stopping them each one by one, taking screen shots then, working from the screen shots). I dread to think what happens when you start sharing multiply kept ebooks (I think someone could download 1 but then Sugar would assume additionally kept and shared books were all the same object and would just resume the 1st book you downloaded)... Ouch!

I'm thinking that maybe I need to put some kind of close button on my results table. That I can probably figure out how to do.

Yes, or just an extra toolbar button in your books tab.

comment:4 follow-up: Changed 15 years ago by jdsimmons

Version 12 should fix these problems:

1). I no longer require you to use the Keep button after each download. Now each book gets its own Journal entry with its own unique Journal ID. I also display a message box after the download to let the user know it's happening.

2). I provide a button with the dialog close symbol to hide the results list. It is disabled when it would not be valid to use it.

3). To prevent duplicate entries for the final book downloaded, I delete the last created Journal entry in write_file() if the Activity is being closed.

4). I have made the Help text optional reading. It is still somewhat informative and fills
what would otherwise be an empty screen, but it doesn't give any vital information for using the Activity.

comment:5 Changed 15 years ago by jdsimmons

  • Status changed from new to accepted

comment:6 in reply to: ↑ 4 Changed 15 years ago by garycmartin

Replying to jdsimmons:

3). To prevent duplicate entries for the final book downloaded, I delete the last created Journal entry in write_file() if the Activity is being closed.

FWIW: The other option here is to only create a new Journal entry if/as you replace a previous set of content by downloading a new book. Then there's no duplicate to delete.

comment:7 Changed 15 years ago by jdsimmons

I see the use case being like this:

I download the first book and save it to the Journal.

I use the load_document() method to display the book to the user, because he might want to read it.

I download a second book and save it to the Journal.

I use load_document() to display *that* book to the user.

The user hides the search results table and starts reading his second downloaded book. He gets to page 64.

He closes the Activity.

Just before closing there are two copies of the book in the Journal. The one that the user was reading, which has meta data indicating he stopped on page 64, will be saved to the Journal by the write method that is invoked when the Activity closes. The entry created in the Journal *before* the user started reading it has *no* metadata so it is the logical one to remove from the Journal. Fortunately I save a pointer to the last Journal object I created, so it's easy to delete.

comment:8 Changed 15 years ago by jdsimmons

  • Bug Status changed from Unconfirmed to Resolved
  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.