cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
509 stars 83 forks source link

Only show feedback on page given #1

Closed connorff closed 1 year ago

connorff commented 1 year ago

This PR appends the current page path (window.location.pathname) to the extra field stored in local storage. This value is used to filter which highlights should be rendered, fixing the current issue where all highlights are shown regardless of which page they were created.

The extra field is still a string, but instead of only being the text the user submitted as feedback, it's now a stringified object with a text attribute (user's feedback) and page attribute.

willcrichton commented 1 year ago

Good catch!