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

Create the functionality to add laws to a portfolio #30

Closed
waldoj opened this Issue Apr 16, 2012 · 19 comments

Comments

Projects
None yet
2 participants
@waldoj
Member

waldoj commented Apr 16, 2012

Let people maintain a sort of a shopping cart of laws (and chapters, titles, etc?).

  • create JavaScript functions to add, remove, and display the status of an individual law in local storage
  • create a JavaScript function to list every law in local storage
  • implement the add/remove/status functionality on the law page
  • create a new page to list every law in local storage
  • devise a name for this feature
  • display the menu item for this new page only if the user has 1+ laws in local storage
@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Aug 29, 2013

Member

Use local storage for this and skip all the PHP.

Member

waldoj commented Aug 29, 2013

Use local storage for this and skip all the PHP.

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Sep 5, 2013

Member

This can be done with jQuery. When triggered by a user action, execute localStorage.setItem(this.law,'saved') or localStorage.removeItem(this.law), or something like that. Each law's page can reflect whether or not the law has been saved by the person, and then the portfolio page can just iterate through all of the laws in the user's portfolio and display the list.

Member

waldoj commented Sep 5, 2013

This can be done with jQuery. When triggered by a user action, execute localStorage.setItem(this.law,'saved') or localStorage.removeItem(this.law), or something like that. Each law's page can reflect whether or not the law has been saved by the person, and then the portfolio page can just iterate through all of the laws in the user's portfolio and display the list.

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Sep 15, 2013

Member

It really would be helpful if, at the time that this function was triggered, we also made a call to the server to simply report that somebody (anonymously) has added this law to their portfolio. If we can know that an individual is tracking a particular collection of laws, then we can know that those laws are in some way related. That's really useful. It's great to do this client-side, but don't lose the really useful data that comes of having some knowledge about who's tracking what.

Member

waldoj commented Sep 15, 2013

It really would be helpful if, at the time that this function was triggered, we also made a call to the server to simply report that somebody (anonymously) has added this law to their portfolio. If we can know that an individual is tracking a particular collection of laws, then we can know that those laws are in some way related. That's really useful. It's great to do this client-side, but don't lose the really useful data that comes of having some knowledge about who's tracking what.

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 5, 2014

Member

Propose moving Milestone to Future.

Member

krues8dr commented Nov 5, 2014

Propose moving Milestone to Future.

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Nov 5, 2014

Member

I don't want to let this go. At a minimum, I want to add the functionality without server-side tracking. At that point, it's just a handful of lines of JavaScript and a bit of CSS. It might not even need its own page—it could just be an overlay.

Member

waldoj commented Nov 5, 2014

I don't want to let this go. At a minimum, I want to add the functionality without server-side tracking. At that point, it's just a handful of lines of JavaScript and a bit of CSS. It might not even need its own page—it could just be an overlay.

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 5, 2014

Member

Keep in mind something like this needs a lot of UX to be done right. It's not just an add-to-cart, it's also remove-from-cart, organize-my-cart, etc - and all of that needs to be designed.

And of course the legalese at the bottom has to get an update because of cookie Local Storage use (privacy policy), and on any european installations we'll need a theme with a popup to tell them cookies local storage is in use. Disregard, localStorage has pretty decent browser support. Disregard my disregarding, the laws that cover cookie usage also cover localStorage. Huh.

Member

krues8dr commented Nov 5, 2014

Keep in mind something like this needs a lot of UX to be done right. It's not just an add-to-cart, it's also remove-from-cart, organize-my-cart, etc - and all of that needs to be designed.

And of course the legalese at the bottom has to get an update because of cookie Local Storage use (privacy policy), and on any european installations we'll need a theme with a popup to tell them cookies local storage is in use. Disregard, localStorage has pretty decent browser support. Disregard my disregarding, the laws that cover cookie usage also cover localStorage. Huh.

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Nov 5, 2014

Member

Nah, no need for cookies—it's all in local storage. And I'm not worried about Europe—I don't have the faintest idea of how their legal codes work, but it's way out of the scope of this project now. And I don't see any need for organizing as a 1.0 feature. Really, it's just add and remove, and remove can just be a toggled display on the law page (e.g., "Add" becomes "Remove").

Ain't no harm in trying. I'll enjoy it.

Member

waldoj commented Nov 5, 2014

Nah, no need for cookies—it's all in local storage. And I'm not worried about Europe—I don't have the faintest idea of how their legal codes work, but it's way out of the scope of this project now. And I don't see any need for organizing as a 1.0 feature. Really, it's just add and remove, and remove can just be a toggled display on the law page (e.g., "Add" becomes "Remove").

Ain't no harm in trying. I'll enjoy it.

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 5, 2014

Member

Ok, but please at least try to get a few minutes of @boboroshi 's time on this. ;) Modals suck.

Member

krues8dr commented Nov 5, 2014

Ok, but please at least try to get a few minutes of @boboroshi 's time on this. ;) Modals suck.

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 5, 2014

Member

The legalese will need to be updated though. If we're putting anything on user's computers, we need some sort of privacy policy by default. Our localities won't be cool with it otherwise. (To be fair, we probably need one for Google Analytics as well though. Oops.)

Member

krues8dr commented Nov 5, 2014

The legalese will need to be updated though. If we're putting anything on user's computers, we need some sort of privacy policy by default. Our localities won't be cool with it otherwise. (To be fair, we probably need one for Google Analytics as well though. Oops.)

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Nov 5, 2014

Member

The legalese is really just isn't our problem. It's up to everybody installing this to determine what laws matter in their state and locality and provide the appropriate TOS, privacy policy, etc. Just as with WordPress, Drupal, etc.

As people who also implement this software, legalese is our problem, but that's wearing a different hat. :)

Member

waldoj commented Nov 5, 2014

The legalese is really just isn't our problem. It's up to everybody installing this to determine what laws matter in their state and locality and provide the appropriate TOS, privacy policy, etc. Just as with WordPress, Drupal, etc.

As people who also implement this software, legalese is our problem, but that's wearing a different hat. :)

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 5, 2014

Member

My hat is very complicated and dapper. 🎩

Member

krues8dr commented Nov 5, 2014

My hat is very complicated and dapper. 🎩

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 6, 2014

Member

@waldoj Not to beat a dead horse here, but what's the point of this feature? How is it not just duplicating the native bookmarks in-browser? Or is this for offline reading?

Member

krues8dr commented Nov 6, 2014

@waldoj Not to beat a dead horse here, but what's the point of this feature? How is it not just duplicating the native bookmarks in-browser? Or is this for offline reading?

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Nov 6, 2014

Member

This has been an often-requested feature. People researching laws often find multiple relevant ones, and they want to mark the ones that seem relevant, as they go. Like a shopping cart, but for laws. This is especially for citizens who are doing their own legal research, not attorneys or lawmakers (that's who keeps requesting this).

Member

waldoj commented Nov 6, 2014

This has been an often-requested feature. People researching laws often find multiple relevant ones, and they want to mark the ones that seem relevant, as they go. Like a shopping cart, but for laws. This is especially for citizens who are doing their own legal research, not attorneys or lawmakers (that's who keeps requesting this).

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr Nov 6, 2014

Member

Do they not know how to bookmark things? ¯(°_o)/¯

Member

krues8dr commented Nov 6, 2014

Do they not know how to bookmark things? ¯(°_o)/¯

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Nov 6, 2014

Member

Almost nobody bookmarks things, and those who do regard it not as a place for temporary collections (ie, "laws that might potentially be the one I'm looking for over ten minutes of research") but instead permanent ("now that I've signed up for online banking, I should bookmark the site"). Bookmark management is built to encourage this behavior.

Member

waldoj commented Nov 6, 2014

Almost nobody bookmarks things, and those who do regard it not as a place for temporary collections (ie, "laws that might potentially be the one I'm looking for over ten minutes of research") but instead permanent ("now that I've signed up for online banking, I should bookmark the site"). Bookmark management is built to encourage this behavior.

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr

krues8dr May 13, 2015

Member

I'm reading more on localstorage and it sounds like it's just as impermanent as cookies:

I can't speak for other platforms, but on my 4.1 Android device, I'm using localStorage to store some data locally with jQuery Mobile, and I've found that Android will clear my cache every week or so without my knowledge.

http://stackoverflow.com/questions/7750857/how-permanent-is-local-storage-on-android-and-ios

I'm not sure this is a good way to implement this feature if it's so ephemeral. Cookies have similar problems - we can try and make them "permanent", but it's not going to stick. We really will have to document this if we're going to do it, because it's going to be losing people's data constantly.

Member

krues8dr commented May 13, 2015

I'm reading more on localstorage and it sounds like it's just as impermanent as cookies:

I can't speak for other platforms, but on my 4.1 Android device, I'm using localStorage to store some data locally with jQuery Mobile, and I've found that Android will clear my cache every week or so without my knowledge.

http://stackoverflow.com/questions/7750857/how-permanent-is-local-storage-on-android-and-ios

I'm not sure this is a good way to implement this feature if it's so ephemeral. Cookies have similar problems - we can try and make them "permanent", but it's not going to stick. We really will have to document this if we're going to do it, because it's going to be losing people's data constantly.

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj May 13, 2015

Member

Yup. If people delete their local storage (not something people generally do accidentally) then, yes, they will lose their local storage. Short of an entire login and password system, there is nothing that will survive people deleting their cookies or their local storage. :) I bet we could set an expiry date of 30 days, and it would still work great for just about everybody. The traffic patterns that I see are people engaging in short bursts of research—anywhere from an hour to a week—and then they don't come back.

Member

waldoj commented May 13, 2015

Yup. If people delete their local storage (not something people generally do accidentally) then, yes, they will lose their local storage. Short of an entire login and password system, there is nothing that will survive people deleting their cookies or their local storage. :) I bet we could set an expiry date of 30 days, and it would still work great for just about everybody. The traffic patterns that I see are people engaging in short bursts of research—anywhere from an hour to a week—and then they don't come back.

@krues8dr

This comment has been minimized.

Show comment
Hide comment
@krues8dr
Member

krues8dr commented Jan 18, 2017

screen shot 2017-01-18 at 2 43 31 pm
screen shot 2017-01-18 at 2 43 46 pm

@waldoj

This comment has been minimized.

Show comment
Hide comment
@waldoj

waldoj Jan 18, 2017

Member

Oooh, very nice! The pinned metaphor works well, too.

Member

waldoj commented Jan 18, 2017

Oooh, very nice! The pinned metaphor works well, too.

@krues8dr krues8dr closed this in d0496cb Apr 7, 2017

krues8dr added a commit that referenced this issue Apr 7, 2017

Merge pull request #682 from statedecoded/issue-30
Adding ability to pin laws.  Fixes #30.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment