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

Remove / edit activities from HOME screen #5

Closed
PhilGrunewald opened this issue Mar 10, 2016 · 10 comments
Closed

Remove / edit activities from HOME screen #5

PhilGrunewald opened this issue Mar 10, 2016 · 10 comments
Assignees

Comments

@PhilGrunewald
Copy link
Owner

Left symbol to remove
Right time (when reported) - onClick option to change the time

@PhilGrunewald
Copy link
Owner Author

Information to display on HOME screen:


Ongoing activities

remove me activity - location symbol - time

Past activities

reactivate me - activity - location symbol - end time


Functionality:
<remove me>
OnClick: move to "Past activities"

<reactivate me>
OnClick: add to "Ongoing activities" with current time

<activity> <location symbol> <time>
OnClick: edit location and time

@PhilGrunewald
Copy link
Owner Author

once a long list of activities had piled up (>240 entries), the app 'froze' on 'enjoyment' - failed to build the 'home' screen.

I trust this will go away if the activity list is kept to a reasonable length.

@gozzilli
Copy link
Collaborator

Given that this generates problems, it should be high priority.
@PhilGrunewald you are assigned to it so I'll leave it to you. Let me know if you want me to chip in (it's probably a big-ish piece of code.

@gozzilli
Copy link
Collaborator

Why don't I keep my mouth shut?

@PhilGrunewald
Copy link
Owner Author

Be my guest - the 'remove' function isn't working yet (I don't think) and I am not sure if I can hard code the 'item' as a reference into the html tag...

@gozzilli
Copy link
Collaborator

Ok, I'll have a look.

gozzilli added a commit that referenced this issue Mar 23, 2016
@gozzilli
Copy link
Collaborator

COMPLETE/REMOVE activity is now implemented.
We're not currently (afaik) keeping a list of past activities, as per your diagram above. Should we?

@gozzilli
Copy link
Collaborator

Also I should add that to implement this I've used a UUID for storing the key of a newly created activity. This changes the structure of activity_list from array to dictionary (well, just object in JS). I haven't checked thoroughly if this breaks anything (I'm thinking of the logging mainly).

@gozzilli
Copy link
Collaborator

I've added time to the activity list. This is a fairly major restructuing of both the layout of the activity list and the storage of the activity list in the localStorage object.

The activity list is now a dictionary with key UUID (this was such already), but with value an object containing (so far) name and time. This can be extended and it's much more robust. It's also a necessary change to save the time of an activity.

Here is the structure:

activityList[uuid] = {
  "name" : app.get(CURR_ACTIVITY),
  "time" : Date.now()
}

And here is what it looks like:
meter2

Since this could be fairly disruptive, I've put it in a separate branch done-time. @PhilGrunewald please merge this (or let me know and I'll merge it) before doing much more development.

Also, please let me know if it disrupted any other function that you have implemented.

@PhilGrunewald
Copy link
Owner Author

You are a star.
Thank you so much.
If you don't mind, I'll play with it over easter...
Phil

-------- Original message --------
From: Davide notifications@github.com
Date: 24/03/2016 16:04 (GMT+00:00)
To: PhilGrunewald/MeterApp MeterApp@noreply.github.com
Cc: Philipp Grunewald philipp.grunewald@ouce.ox.ac.uk
Subject: Re: [MeterApp] Remove / edit activities from HOME screen (#5)

I've added time to the activity list. This is a fairly major restructuing of both the layout of the activity list and the storage of the activity list in the localStorage object.

The activity list is now a dictionary with key UUID (this was such already), but with value an object containing (so far) name and time. This can be extended and it's much more robust. It's also a necessary change to save the time of an activity.

Here is the structure:

activityList[uuid] = {
"name" : app.get(CURR_ACTIVITY),
"time" : Date.now()
}

And here is what it looks like:
[meter2]https://cloud.githubusercontent.com/assets/1502267/14022920/e37d5c80-f1d9-11e5-80fe-437a1d28fd1a.png

Since this could be fairly disruptive, I've put it in a separate branch done-time. @PhilGrunewaldhttps://github.com/PhilGrunewald please merge this (or let me know and I'll merge it) before doing much more development.

Also, please let me know if it disrupted any other function that you have implemented.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-200903135

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

2 participants