From 61725c434f37506c7db12ad5e6ab15b26498f542 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Mon, 22 Apr 2024 11:53:40 -0400 Subject: [PATCH] note highlights --- src/langs/json/en.json | 6 +- .../fixtures/documents/search-highlight.json | 1036 +++++++---------- src/lib/api/types.d.ts | 7 +- .../documents/NoteHighlights.svelte | 70 ++ .../components/documents/ResultsList.svelte | 8 +- .../documents/SearchHighlights.svelte | 11 +- .../stories/NoteHighlights.stories.svelte | 24 + .../stories/SearchHighlights.stories.svelte | 6 +- 8 files changed, 556 insertions(+), 612 deletions(-) create mode 100644 src/lib/components/documents/NoteHighlights.svelte create mode 100644 src/lib/components/documents/stories/NoteHighlights.stories.svelte diff --git a/src/langs/json/en.json b/src/langs/json/en.json index 59f69898b..1daaa97e3 100644 --- a/src/langs/json/en.json +++ b/src/langs/json/en.json @@ -437,12 +437,14 @@ "project": "Project", "totalMatchingPages": "{n} of {m} pages matching the query", "showAll": "Show all", - "matchingPages": "{n} pages matching the query", + "matchingPages": "{n, plural, one {# page} other {# pages}} matching the query", + "matchingNotes": "{n, plural, one {# note} other {# notes}} matching the query", "page": "Page", "pageAbbrev": "p.", "pageCount": "{n, plural, one {# page} other {# pages}}", "source": "Source", - "noteCount": "{n, plural, one {# note} other {# notes}}" + "noteCount": "{n, plural, one {# note} other {# notes}}", + "noteLink": "See note" }, "documentThumbnail": { "pages": "pages", diff --git a/src/lib/api/fixtures/documents/search-highlight.json b/src/lib/api/fixtures/documents/search-highlight.json index 535952d93..1728c2844 100644 --- a/src/lib/api/fixtures/documents/search-highlight.json +++ b/src/lib/api/fixtures/documents/search-highlight.json @@ -1,29 +1,217 @@ { - "count": 318905, - "next": "https://api.www.documentcloud.org/api/documents/search/?q=boston&hl=true&expand=user%2Corganization&cursor=AoMIQj5PanHip%2FOcgwMoMjIzOTM0MDc%3D", + "count": 326697, + "next": "https://api.www.documentcloud.org/api/documents/search/?format=json&hl=true&q=boston&cursor=AoMIQkKnlnHToPabywInMTUxMzAwMg%3D%3D", "previous": null, "results": [ { - "id": "2287364", - "user": { - "id": 3379, - "avatar_url": "", - "name": "Jennifer Valentino-DeVries", - "organization": 28481, - "organizations": [28481], - "admin_organizations": [28481], - "username": "JenniferValentino-DeVries_DwTWpBbP", - "uuid": "e421050a-7195-4fff-938a-d7353cfc989c", - "verified_journalist": true - }, - "organization": { - "id": 487, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Wall Street Journal", - "slug": "the-wall-street-journal", - "uuid": "84e563bc-6751-4702-9e30-fba52481cdcb" + "id": "1501881", + "user": 1083, + "organization": 13, + "access": "public", + "status": "success", + "title": "Mayor Walsh State of the City 2015 as Prepared", + "slug": "mayor-walsh-state-of-the-city-2015-as-prepared", + "language": "eng", + "created_at": "2015-01-13T20:55:46.282Z", + "updated_at": "2020-11-10T19:28:54.782Z", + "page_count": 9, + "original_extension": "pdf", + "file_hash": "6cbfbf0f05eca2c1902063a4d66d51972e19e2ac", + "related_article": "http://www.bostonglobe.com/metro/2015/01/13/mayor-martin-walsh-delivers-state-city-address/MEtguJ2GJu7N2fELAQviRN/story.html", + "edit_access": false, + "notes": [ + { + "id": "196957", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Firefighters killed in Back Bay fire receive top award", + "created_at": "2015-01-13T22:36:39.109Z", + "updated_at": "2020-11-10T19:29:00.833Z", + "content": "Boston Firefighter Michael R. Kennedy was a square-jawed, 33-year-old Marine Corps veteran who saw combat in Iraq and a first responder who rushed to treat victims of the Boston Marathon bombings. He spent days off roaring down the road on his motorcycle and pushing himself and others to the limits as a Crossfit trainer.\n\nFire Lieutenant Edward J. Walsh Jr. had tried a career in finance, but his passion was for firefighting. Nine and a half years ago, Walsh became a Boston firefighter, following in the footsteps of his late father, a lieutenant in the Watertown Fire Department.\n\n[Story]", + "page_number": 0 + }, + { + "id": "196979", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Paris terror attacks January 2015", + "created_at": "2015-01-13T23:31:14.434Z", + "updated_at": "2020-11-10T19:29:00.834Z", + "content": "The Big Picture: Paris attack\n", + "page_number": 0 + }, + { + "id": "197010", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Boston police officer dies after medical emergency", + "created_at": "2015-01-14T00:55:03.392Z", + "updated_at": "2020-11-10T19:29:00.833Z", + "content": "Boston police officer dies after medical emergency. [Story]\n", + "page_number": 0 + }, + { + "id": "197011", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Dawnn Jaffier’s life of service recalled by mourners", + "created_at": "2015-01-14T00:55:37.666Z", + "updated_at": "2020-11-10T19:29:00.836Z", + "content": "Dawnn Jaffier’s life of service recalled by mourners. [Story]\n", + "page_number": 0 + }, + { + "id": "197013", + "user": 1083, + "organization": 13, + "access": "public", + "title": "State and national economies poised for growth", + "created_at": "2015-01-14T00:57:45.167Z", + "updated_at": "2020-11-10T19:29:00.837Z", + "content": "State and national economies poised for growth. [Story]", + "page_number": 1 + }, + { + "id": "197012", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Tom Menino's life", + "created_at": "2015-01-14T00:56:22.875Z", + "updated_at": "2020-11-10T19:29:00.833Z", + "content": "A look back at Tom Menino's tenure as Mayor of Boston. [Story]", + "page_number": 1 + }, + { + "id": "197014", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Mayor Walsh visited Ireland this year", + "created_at": "2015-01-14T00:59:36.348Z", + "updated_at": "2020-11-10T19:29:00.835Z", + "content": "An emotional Mayor Martin J. Walsh of Boston landed before dawn Friday on Irish soil and paid homage to Shannon Airport, the point of departure to Boston for scores of immigrants, including his parents, and the setting of a poignant speech by President John F. Kennedy. [Story]", + "page_number": 1 + }, + { + "id": "197031", + "user": 1083, + "organization": 13, + "access": "public", + "title": "City tests new weapons in fight against potholes", + "created_at": "2015-01-14T01:14:09.405Z", + "updated_at": "2020-11-10T19:29:00.835Z", + "content": "In the latest round of Boston versus potholes, the city is bringing in the big guns: a Silly Putty-like material encased in portable plastic bags invented by college students. Shape-shifting goo that hardens instantly under pressure. [Story]", + "page_number": 2 + }, + { + "id": "197034", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Skyline blooms as Boston OK’s over $1.5b in projects", + "created_at": "2015-01-14T01:15:30.784Z", + "updated_at": "2020-11-10T19:29:00.836Z", + "content": "City regulators this week approved more than $1.5 billion in new construction projects, including a $500 million expansion of New Balance’s headquarters in Brighton, as well as large residential and retail developments in Downtown Crossing, the Fenway, and the South End. [Story]", + "page_number": 2 + }, + { + "id": "197023", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Boston EMS workers OK pay raise", + "created_at": "2015-01-14T01:06:36.632Z", + "updated_at": "2020-11-10T19:29:00.837Z", + "content": "Workers in Boston’s Emergency Medical Services will receive a pay raise of nearly 15 percent over six years under a newly settled contract with Mayor Martin J. Walsh. [Story]", + "page_number": 2 + } + ], + "highlights": { + "page_no_1": [ + "To all the people of Boston and our region, present tonight or watching at home: good evening.\n" + ], + "page_no_2": [ + "As Boston\napproaches its 400th birthday, our goal is a thriving, healthy, and innovative city for all; one\ncommunity that is a global leader for the 21st century. " + ], + "page_no_3": [ + "We created\nthe most diverse command staff in the Boston Police Department's history. " + ], + "page_no_4": [ + "Boston now competes\nagainst the world, as America’s city. Whatever the outcome, Boston will prove itself a global\nleader. " + ], + "page_no_5": [ + "We tripled the size of\nthe Success Boston college completion program. " + ], + "page_no_6": [ + "Page 6 of 9\n\n+++\nBoston is a city of revolutionary innovation. But in Boston we know that a revolution only\nsucceeds when it galvanizes the whole community. " + ], + "page_no_7": [ + "Demand for housing in Boston is at a historic high:\nputting prices and rents out of reach for too many. " + ], + "page_no_8": [ + "For that, I\ncommend the officers of the Boston Police Department ... and those who protested. " + ], + "page_no_9": [ + "Finally, I think about the Boston firefighters I saw at Beacon Street on March 26. " + ] }, + "data": {}, + "asset_url": "https://s3.documentcloud.org/", + "canonical_url": "https://www.documentcloud.org/documents/1501881-mayor-walsh-state-of-the-city-2015-as-prepared", + "note_highlights": { + "197010": { + "title": [ + "Boston police officer dies after medical emergency" + ], + "description": [ + "Boston police officer dies after medical emergency. [Boston OK’s over $1.5b in projects" + ], + "description": [ + "://www.bostonglobe.com/business/2012/09/14/boston-approves-billion-development-projects-boston-new-construction" + ] + }, + "197023": { + "title": ["Boston EMS workers OK pay raise"], + "description": [ + "://www.bostonglobe.com/metro/2014/08/29/boston-ems-union-approves-new-contract/01DPyGIoB4DOLmpOjajW5L/story.html\">Story]" + ] + }, + "197012": { + "description": [ + "A look back at Tom Menino's tenure as Mayor of Boston. [Boston landed before dawn Friday on Irish soil and paid" + ] + }, + "196957": { + "description": [ + "Boston Firefighter Michael R. Kennedy was a square-jawed, 33-year-old Marine Corps veteran who saw" + ] + }, + "197031": { + "description": [ + "In the latest round of Boston versus potholes, the city is bringing in the big guns: a Silly Putty" + ] + } + } + }, + { + "id": "2287364", + "user": 3379, + "organization": 487, "access": "public", "status": "success", "title": "Boston", @@ -43,29 +231,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/2287364-boston" + "canonical_url": "https://www.documentcloud.org/documents/2287364-boston", + "note_highlights": {} }, { "id": "23066715", - "user": { - "id": 20080, - "avatar_url": "https://cdn.muckrock.com/media/account_images/22_MuckRock_2018_PRELIMANRY_EDITS_DSC_5387_2018_Derek_Kouyoumjian_preview_SfuGGnJ.jpg", - "name": "Mitchell Kotler", - "organization": 125, - "organizations": [10000, 3168, 125, 41248, 10002], - "admin_organizations": [10000, 3168, 125, 41248, 10002], - "username": "mitch", - "uuid": "8136b9b8-95b9-4302-950d-5402e9065978", - "verified_journalist": true - }, - "organization": { - "id": 125, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/logo.png", - "individual": false, - "name": "MuckRock Staff", - "slug": "muckrock", - "uuid": "97109cc6-e52e-41e7-adb7-834ab7c6819c" - }, + "user": 20080, + "organization": 125, "access": "public", "status": "success", "title": "BOSTON", @@ -81,7 +253,7 @@ "description": "", "published_url": "", "related_article": "", - "edit_access": false, + "edit_access": true, "notes": [], "highlights": {}, "data": { @@ -119,29 +291,13 @@ "more1_link": [""] }, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/23066715-boston" + "canonical_url": "https://www.documentcloud.org/documents/23066715-boston", + "note_highlights": {} }, { "id": "3513915", - "user": { - "id": 1083, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "BostonGlobe.com BG", - "organization": 25234, - "organizations": [13, 25234], - "admin_organizations": [13, 25234], - "username": "BostonGlobe.comBG", - "uuid": "e9f28a24-f001-44f1-8886-c35464532947", - "verified_journalist": true - }, - "organization": { - "id": 13, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Boston Globe", - "slug": "boston-globe", - "uuid": "2199ed94-7911-403e-8655-9e09fa2b57cc" - }, + "user": 1083, + "organization": 13, "access": "public", "status": "success", "title": "Boston", @@ -157,29 +313,13 @@ "highlights": {}, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/3513915-Boston" + "canonical_url": "https://www.documentcloud.org/documents/3513915-Boston", + "note_highlights": {} }, { "id": "6243580", - "user": { - "id": 22938, - "avatar_url": "", - "name": "Wheeler Cowperthwaite", - "organization": 1569, - "organizations": [1569, 23127], - "admin_organizations": [1569, 23127], - "username": "WheelerCowperthwaite_wOmeRVsb", - "uuid": "764c03ba-cfbd-4369-a485-09fe1a0ce55f", - "verified_journalist": true - }, - "organization": { - "id": 1569, - "avatar_url": "", - "individual": false, - "name": "Cape Cod Times", - "slug": "capecodtimes", - "uuid": "9c8d3c05-3de7-4d40-bfeb-0d31de2273d4" - }, + "user": 22938, + "organization": 1569, "access": "public", "status": "success", "title": "BOSTON", @@ -206,29 +346,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/6243580-BOSTON" + "canonical_url": "https://www.documentcloud.org/documents/6243580-BOSTON", + "note_highlights": {} }, { "id": "6243452", - "user": { - "id": 22938, - "avatar_url": "", - "name": "Wheeler Cowperthwaite", - "organization": 1569, - "organizations": [1569, 23127], - "admin_organizations": [1569, 23127], - "username": "WheelerCowperthwaite_wOmeRVsb", - "uuid": "764c03ba-cfbd-4369-a485-09fe1a0ce55f", - "verified_journalist": true - }, - "organization": { - "id": 1569, - "avatar_url": "", - "individual": false, - "name": "Cape Cod Times", - "slug": "capecodtimes", - "uuid": "9c8d3c05-3de7-4d40-bfeb-0d31de2273d4" - }, + "user": 22938, + "organization": 1569, "access": "public", "status": "success", "title": "BOSTON", @@ -255,29 +379,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/6243452-BOSTON" + "canonical_url": "https://www.documentcloud.org/documents/6243452-BOSTON", + "note_highlights": {} }, { "id": "70328", - "user": { - "id": 1083, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "BostonGlobe.com BG", - "organization": 25234, - "organizations": [13, 25234], - "admin_organizations": [13, 25234], - "username": "BostonGlobe.comBG", - "uuid": "e9f28a24-f001-44f1-8886-c35464532947", - "verified_journalist": true - }, - "organization": { - "id": 13, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Boston Globe", - "slug": "boston-globe", - "uuid": "2199ed94-7911-403e-8655-9e09fa2b57cc" - }, + "user": 1083, + "organization": 13, "access": "public", "status": "success", "title": "Boston", @@ -294,29 +402,66 @@ "highlights": {}, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/70328-boston" + "canonical_url": "https://www.documentcloud.org/documents/70328-boston", + "note_highlights": {} }, { - "id": "21020996", - "user": { - "id": 102442, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "George Joseph", - "organization": 32718, - "organizations": [32718], - "admin_organizations": [32718], - "username": "georgejosephreporting", - "uuid": "9253e26a-f75a-4cef-95ff-8639c363d573", - "verified_journalist": true - }, - "organization": { - "id": 32718, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": true, - "name": "georgejosephreporting", - "slug": "georgejosephreporting", - "uuid": "9253e26a-f75a-4cef-95ff-8639c363d573" + "id": "3259890", + "user": 16677, + "organization": 57, + "access": "public", + "status": "success", + "title": "Boston, MA", + "slug": "Boston-MA", + "language": "eng", + "created_at": "2017-01-10T21:41:09.259Z", + "updated_at": "2020-11-10T17:02:40.656Z", + "page_count": 13, + "projects": [31169], + "original_extension": "pdf", + "file_hash": "589110e1ac30be1e598458ff5b7dc5e6f224acd0", + "edit_access": false, + "notes": [ + { + "id": "334535", + "user": 16677, + "organization": 57, + "access": "public", + "title": "The contract is still in effect as of January 2017, according to a spokesperson from the Boston Police Patrolmen's Association.", + "created_at": "2017-01-12T19:40:21.486Z", + "updated_at": "2020-11-10T17:02:52.658Z", + "page_number": 0 + } + ], + "highlights": { + "page_no_1": [ + "Sep 27 13 11 :20a\n\nEstelle\n\n954-752-5581\n\nCity of Boston and Boston Police Patrolmen's Association\nJLMC No. 12-32P\n\nAWARD\n\nThe panel convened pursuant to the joint submission of the parties after a declaration that\nthe parties were unable to agree to the terms and conditions of a new collective\nbargaining agreement for the period commencing July 1, 2010.\n" + ], + "page_no_8": [ + "This includes but is not limited to the\nfollowing events/circumstances: First Night, Boston Marathon, Caribbean\nFestival, July 4th, major sporting events, major cultural events, and weather\nemergencies.\nii. " + ], + "page_no_12": [ + "CITY OF BOSTON\nOFFICE OF ADMINISTRATION\n\n& FINANCE\n\nCity of Boston and Boston Police Patrolmen's Association JLMC No. 12-32P\nDissent by the City of Boston Panel Member John Dunlap\nThis award grants a sa lary increase of 25.4% to police officers over a six-yea r period and will cost the taxpayers\nmore than $80 million- more than twice as much as the City's offer would have cost. " + ], + "page_no_13": [ + "The group of unions which had\nvoluntarily settled with the City included the Boston Teachers Union (BTU)- the City's largest union. " + ] }, + "data": {}, + "asset_url": "https://s3.documentcloud.org/", + "canonical_url": "https://www.documentcloud.org/documents/3259890-Boston-MA", + "note_highlights": { + "334535": { + "title": [ + "The contract is still in effect as of January 2017, according to a spokesperson from the Boston" + ] + } + } + }, + { + "id": "21020996", + "user": 102442, + "organization": 32718, "access": "public", "status": "success", "title": "BOSTON-e57ccc8cd255272caba251c540347f304f10438e", @@ -340,29 +485,13 @@ "mos_name": ["BOSTON"] }, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/21020996-boston-e57ccc8cd255272caba251c540347f304f10438e" + "canonical_url": "https://www.documentcloud.org/documents/21020996-boston-e57ccc8cd255272caba251c540347f304f10438e", + "note_highlights": {} }, { "id": "4229282", - "user": { - "id": 6984, - "avatar_url": "", - "name": "Jeff Ernsthausen", - "organization": 370, - "organizations": [370, 26824], - "admin_organizations": [26824], - "username": "JeffErnsthausen_OWctfCLJ", - "uuid": "dc9e1ef9-5e2d-473e-892f-8bab516c1933", - "verified_journalist": true - }, - "organization": { - "id": 85, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "Atlanta Journal-Constitution", - "slug": "atlanta-journal-constitution", - "uuid": "d080be61-c834-4c41-9792-2e827612afb6" - }, + "user": 6984, + "organization": 85, "access": "public", "status": "success", "title": "Boston,_Sherry_1_31_16_", @@ -391,29 +520,13 @@ "document_type": ["<$2500 Affidavit"] }, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/4229282-Boston-Sherry-1-31-16" + "canonical_url": "https://www.documentcloud.org/documents/4229282-Boston-Sherry-1-31-16", + "note_highlights": {} }, { "id": "3437950", - "user": { - "id": 1083, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "BostonGlobe.com BG", - "organization": 25234, - "organizations": [13, 25234], - "admin_organizations": [13, 25234], - "username": "BostonGlobe.comBG", - "uuid": "e9f28a24-f001-44f1-8886-c35464532947", - "verified_journalist": true - }, - "organization": { - "id": 13, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Boston Globe", - "slug": "boston-globe", - "uuid": "2199ed94-7911-403e-8655-9e09fa2b57cc" - }, + "user": 1083, + "organization": 13, "access": "public", "status": "success", "title": "Boston Order", @@ -430,29 +543,13 @@ "highlights": {}, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/3437950-Boston-Order" + "canonical_url": "https://www.documentcloud.org/documents/3437950-Boston-Order", + "note_highlights": {} }, { "id": "1390996", - "user": { - "id": 659, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Muckrock Staff", - "organization": 60250, - "organizations": [60250, 12303], - "admin_organizations": [12303], - "username": "MuckrockStaff", - "uuid": "25d842d6-a24e-4dc6-8351-950824e432fc", - "verified_journalist": true - }, - "organization": { - "id": 125, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/logo.png", - "individual": false, - "name": "MuckRock Staff", - "slug": "muckrock", - "uuid": "97109cc6-e52e-41e7-adb7-834ab7c6819c" - }, + "user": 659, + "organization": 125, "access": "public", "status": "success", "title": "851696 Boston", @@ -465,7 +562,7 @@ "original_extension": "pdf", "file_hash": "3ab71d546b463810c2cb38afafa49724e08b69fc", "related_article": "https://www.muckrock.com/foi/california-52/ca-doc-contractsmous-re-cai-boston-avenue-15063/", - "edit_access": false, + "edit_access": true, "notes": [], "highlights": { "page_no_1": [ @@ -474,29 +571,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/1390996-851696-boston" + "canonical_url": "https://www.documentcloud.org/documents/1390996-851696-boston", + "note_highlights": {} }, { "id": "23926033", - "user": { - "id": 20936, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Akela Lacy", - "organization": 1088, - "organizations": [28143, 1088], - "admin_organizations": [28143], - "username": "AkelaLacy_daAuMBZe", - "uuid": "acfec596-0f77-4a54-8158-041596161ed2", - "verified_journalist": true - }, - "organization": { - "id": 1088, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Intercept", - "slug": "the-intercept", - "uuid": "6670f83b-7c10-4acb-89e3-44197ba295ae" - }, + "user": 20936, + "organization": 1088, "access": "public", "status": "success", "title": "Boston affidavit", @@ -520,29 +601,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/23926033-boston-affidavit" + "canonical_url": "https://www.documentcloud.org/documents/23926033-boston-affidavit", + "note_highlights": {} }, { "id": "7033949", - "user": { - "id": 13178, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Eriq Gardner", - "organization": 20240, - "organizations": [20240, 1602], - "admin_organizations": [20240, 1602], - "username": "eriqgardner", - "uuid": "7b367166-104f-4cbd-83cc-d7eca489b055", - "verified_journalist": true - }, - "organization": { - "id": 1602, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Hollywood Reporter", - "slug": "thehollywoodreporter", - "uuid": "9f1fdad3-7dbb-4881-a5a6-f0dad3a4a8bf" - }, + "user": 13178, + "organization": 1602, "access": "public", "status": "success", "title": "Boston TX", @@ -580,29 +645,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/7033949-Boston-TX" + "canonical_url": "https://www.documentcloud.org/documents/7033949-Boston-TX", + "note_highlights": {} }, { "id": "4178289", - "user": { - "id": 659, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Muckrock Staff", - "organization": 60250, - "organizations": [60250, 12303], - "admin_organizations": [12303], - "username": "MuckrockStaff", - "uuid": "25d842d6-a24e-4dc6-8351-950824e432fc", - "verified_journalist": true - }, - "organization": { - "id": 125, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/logo.png", - "individual": false, - "name": "MuckRock Staff", - "slug": "muckrock", - "uuid": "97109cc6-e52e-41e7-adb7-834ab7c6819c" - }, + "user": 659, + "organization": 125, "access": "public", "status": "success", "title": "Boston Bid", @@ -614,7 +663,7 @@ "original_extension": "pdf", "file_hash": "c5f9b973237e44deb76e8bdb7e10f65328b1be6b", "related_article": "https://www.muckrock.com/foi/boston-3/amazon-hq2-bid-44971/", - "edit_access": false, + "edit_access": true, "notes": [], "highlights": { "page_no_2": [ @@ -1043,29 +1092,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/4178289-Boston-Bid" + "canonical_url": "https://www.documentcloud.org/documents/4178289-Boston-Bid", + "note_highlights": {} }, { "id": "3913417", - "user": { - "id": 659, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Muckrock Staff", - "organization": 60250, - "organizations": [60250, 12303], - "admin_organizations": [12303], - "username": "MuckrockStaff", - "uuid": "25d842d6-a24e-4dc6-8351-950824e432fc", - "verified_journalist": true - }, - "organization": { - "id": 125, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/logo.png", - "individual": false, - "name": "MuckRock Staff", - "slug": "muckrock", - "uuid": "97109cc6-e52e-41e7-adb7-834ab7c6819c" - }, + "user": 659, + "organization": 125, "access": "public", "status": "success", "title": "Boston PD_Redacted", @@ -1078,7 +1111,7 @@ "original_extension": "pdf", "file_hash": "d40f695c55ea6c381244c0ffb11f9aaeebb2379d", "related_article": "https://www.muckrock.com/foi/massachusetts-1/2016-byrnes-jag-pass-through-grants-38864/", - "edit_access": false, + "edit_access": true, "notes": [], "highlights": { "page_no_1": [ @@ -1114,29 +1147,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/3913417-Boston-PD-Redacted" + "canonical_url": "https://www.documentcloud.org/documents/3913417-Boston-PD-Redacted", + "note_highlights": {} }, { "id": "4229276", - "user": { - "id": 6984, - "avatar_url": "", - "name": "Jeff Ernsthausen", - "organization": 370, - "organizations": [370, 26824], - "admin_organizations": [26824], - "username": "JeffErnsthausen_OWctfCLJ", - "uuid": "dc9e1ef9-5e2d-473e-892f-8bab516c1933", - "verified_journalist": true - }, - "organization": { - "id": 85, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "Atlanta Journal-Constitution", - "slug": "atlanta-journal-constitution", - "uuid": "d080be61-c834-4c41-9792-2e827612afb6" - }, + "user": 6984, + "organization": 85, "access": "public", "status": "success", "title": "Boston,_Sherry_7_5_16_CCDR_CCDR_80904eb9108d4f97bbb813de06d1b37c.pdf", @@ -1186,92 +1203,13 @@ "document_type": ["CCDR"] }, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/4229276-Boston-Sherry-7-5-16-CCDR-CCDR" - }, - { - "id": "3259890", - "user": { - "id": 16677, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Reade Levinson", - "organization": 57, - "organizations": [24817, 57], - "admin_organizations": [24817, 57], - "username": "ReadeLevinson_JruvEVRW", - "uuid": "464329ae-a734-48c7-b813-f6c1dd6f7a80", - "verified_journalist": true - }, - "organization": { - "id": 57, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/3VBu4_Sa_400x400.jpg", - "individual": false, - "name": "Thomson Reuters", - "slug": "thomson-reuters", - "uuid": "855d4473-f37a-4d5d-b536-f9133969006b" - }, - "access": "public", - "status": "success", - "title": "Boston, MA", - "slug": "Boston-MA", - "language": "eng", - "created_at": "2017-01-10T21:41:09.259Z", - "updated_at": "2020-11-10T17:02:40.656Z", - "page_count": 13, - "projects": [31169], - "original_extension": "pdf", - "file_hash": "589110e1ac30be1e598458ff5b7dc5e6f224acd0", - "edit_access": false, - "notes": [ - { - "id": "334535", - "user": 16677, - "organization": 57, - "access": "public", - "title": "The contract is still in effect as of January 2017, according to a spokesperson from the Boston Police Patrolmen's Association.", - "created_at": "2017-01-12T19:40:21.486Z", - "updated_at": "2020-11-10T17:02:52.658Z", - "page_number": 0 - } - ], - "highlights": { - "page_no_1": [ - "Sep 27 13 11 :20a\n\nEstelle\n\n954-752-5581\n\nCity of Boston and Boston Police Patrolmen's Association\nJLMC No. 12-32P\n\nAWARD\n\nThe panel convened pursuant to the joint submission of the parties after a declaration that\nthe parties were unable to agree to the terms and conditions of a new collective\nbargaining agreement for the period commencing July 1, 2010.\n" - ], - "page_no_8": [ - "This includes but is not limited to the\nfollowing events/circumstances: First Night, Boston Marathon, Caribbean\nFestival, July 4th, major sporting events, major cultural events, and weather\nemergencies.\nii. " - ], - "page_no_12": [ - "CITY OF BOSTON\nOFFICE OF ADMINISTRATION\n\n& FINANCE\n\nCity of Boston and Boston Police Patrolmen's Association JLMC No. 12-32P\nDissent by the City of Boston Panel Member John Dunlap\nThis award grants a sa lary increase of 25.4% to police officers over a six-yea r period and will cost the taxpayers\nmore than $80 million- more than twice as much as the City's offer would have cost. " - ], - "page_no_13": [ - "The group of unions which had\nvoluntarily settled with the City included the Boston Teachers Union (BTU)- the City's largest union. " - ] - }, - "data": {}, - "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/3259890-Boston-MA" + "canonical_url": "https://www.documentcloud.org/documents/4229276-Boston-Sherry-7-5-16-CCDR-CCDR", + "note_highlights": {} }, { "id": "690354", - "user": { - "id": 4617, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Telegraph Graphics", - "organization": 330, - "organizations": [330, 19854], - "admin_organizations": [330, 19854], - "username": "TelegraphGraphics", - "uuid": "40871cfc-b78d-4353-bba4-000299ec6574", - "verified_journalist": true - }, - "organization": { - "id": 330, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "The Telegraph", - "slug": "telegraph", - "uuid": "a6f3b924-bd61-45bc-bcb9-f388300fd43f" - }, + "user": 4617, + "organization": 330, "access": "public", "status": "success", "title": "Boston Charge", @@ -1312,29 +1250,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/690354-boston-charge" + "canonical_url": "https://www.documentcloud.org/documents/690354-boston-charge", + "note_highlights": {} }, { "id": "5740788", - "user": { - "id": 21213, - "avatar_url": "", - "name": "Maria Cela", - "organization": 2173, - "organizations": [30107, 2173], - "admin_organizations": [30107], - "username": "MariaCela", - "uuid": "bc9ec625-9df2-4cec-9a6e-587cb4e6210e", - "verified_journalist": true - }, - "organization": { - "id": 2173, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "Telemundo Station Group", - "slug": "telemundostationgroup", - "uuid": "37366958-17ec-414d-8ce1-36cb23c179d1" - }, + "user": 21213, + "organization": 2173, "access": "public", "status": "success", "title": "Opinión Boston", @@ -1351,29 +1273,13 @@ "highlights": {}, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/5740788-Opinio-N-Boston" + "canonical_url": "https://www.documentcloud.org/documents/5740788-Opinio-N-Boston", + "note_highlights": {} }, { "id": "4229280", - "user": { - "id": 6984, - "avatar_url": "", - "name": "Jeff Ernsthausen", - "organization": 370, - "organizations": [370, 26824], - "admin_organizations": [26824], - "username": "JeffErnsthausen_OWctfCLJ", - "uuid": "dc9e1ef9-5e2d-473e-892f-8bab516c1933", - "verified_journalist": true - }, - "organization": { - "id": 85, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "Atlanta Journal-Constitution", - "slug": "atlanta-journal-constitution", - "uuid": "d080be61-c834-4c41-9792-2e827612afb6" - }, + "user": 6984, + "organization": 85, "access": "public", "status": "success", "title": "Boston,_Sherry_1_31_16_Not_Seeking_Reelection_Affidavit_Not_Seeking_Reelection_Affidavit_78c860fe1b8a4e9d9f0b725d9bfc463e.pdf", @@ -1402,29 +1308,13 @@ "document_type": ["Not Seeking Reelection Affidavit"] }, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/4229280-Boston-Sherry-1-31-16-Not-Seeking-Reelection" + "canonical_url": "https://www.documentcloud.org/documents/4229280-Boston-Sherry-1-31-16-Not-Seeking-Reelection", + "note_highlights": {} }, { "id": "3728138", - "user": { - "id": 17647, - "avatar_url": "", - "name": "Jo Herrera", - "organization": 2383, - "organizations": [13667, 2383], - "admin_organizations": [13667, 2383], - "username": "JoHerrera", - "uuid": "0d00a57f-29e5-468a-91ca-295ab8e9d57a", - "verified_journalist": true - }, - "organization": { - "id": 2383, - "avatar_url": "", - "individual": false, - "name": "Southwest News Media", - "slug": "southwestnewsmedia", - "uuid": "a4482f61-1f6a-4207-bb31-d68bb332aee5" - }, + "user": 17647, + "organization": 2383, "access": "public", "status": "success", "title": "Boston 2015", @@ -1457,29 +1347,13 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/3728138-Boston-2015" + "canonical_url": "https://www.documentcloud.org/documents/3728138-Boston-2015", + "note_highlights": {} }, { "id": "353467", - "user": { - "id": 657, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Sean Lahman", - "organization": 124, - "organizations": [124, 22695], - "admin_organizations": [124, 22695], - "username": "SeanLahman_CALNYorD", - "uuid": "0ba39ddb-dbaa-40fa-99d0-f9ac19384d64", - "verified_journalist": true - }, - "organization": { - "id": 124, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "Democrat and Chronicle", - "slug": "dem-and-chron", - "uuid": "5946de32-eec3-41c7-8f71-4274a76bcb80" - }, + "user": 657, + "organization": 124, "access": "public", "status": "success", "title": "Boston Matthew", @@ -1495,29 +1369,13 @@ "highlights": {}, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/353467-boston-matthew" + "canonical_url": "https://www.documentcloud.org/documents/353467-boston-matthew", + "note_highlights": {} }, { "id": "236334", - "user": { - "id": 98, - "avatar_url": "", - "name": "Sarah Cohen", - "organization": 23933, - "organizations": [23933], - "admin_organizations": [23933], - "username": "SarahCohen", - "uuid": "5a2bcbbc-c990-43e1-925f-7d804c0afb49", - "verified_journalist": false - }, - "organization": { - "id": 206, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/organization.png", - "individual": false, - "name": "DeWitt Wallace Center for Media and Democracy", - "slug": "dewitt", - "uuid": "f7fad289-b4a9-49a2-8560-8008fd7903b2" - }, + "user": 98, + "organization": 206, "access": "public", "status": "success", "title": "20081219 Boston", @@ -1533,29 +1391,13 @@ "highlights": {}, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/236334-20081219-boston" + "canonical_url": "https://www.documentcloud.org/documents/236334-20081219-boston", + "note_highlights": {} }, { "id": "23879788", - "user": { - "id": 12709, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "jenifer mckim", - "organization": 1608, - "organizations": [1314, 24758, 1608], - "admin_organizations": [1314, 24758, 1608], - "username": "jmckim", - "uuid": "8238f184-4083-43ff-8003-786857322189", - "verified_journalist": true - }, - "organization": { - "id": 1608, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/HzruDBHP_400x400.jpg", - "individual": false, - "name": "GBH News", - "slug": "wgbhnews", - "uuid": "4a725ef1-aa0b-4e72-ab72-dd7aa06a81a7" - }, + "user": 12709, + "organization": 1608, "access": "public", "status": "success", "title": "1723 Boston rules on Negroes - Boston Common", @@ -1941,113 +1783,103 @@ }, "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/23879788-1723-boston-rules-on-negroes-boston-common" - }, - { - "id": "24164580", - "user": { - "id": 102112, - "avatar_url": "https://cdn.muckrock.com/static/images/avatars/profile.png", - "name": "Sanjin, Open Source Fellow", - "organization": 125, - "organizations": [125, 39877, 2426, 32363], - "admin_organizations": [39877, 32363], - "username": "johnanderson22", - "uuid": "84859f4e-6757-47dc-8fe4-1976d31828dc", - "verified_journalist": true - }, - "organization": { - "id": 125, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/logo.png", - "individual": false, - "name": "MuckRock Staff", - "slug": "muckrock", - "uuid": "97109cc6-e52e-41e7-adb7-834ab7c6819c" - }, - "access": "public", - "status": "success", - "title": "Boston Green Academy_EN", - "slug": "boston-green-academy_en", - "language": "eng", - "created_at": "2023-11-13T19:52:58.192Z", - "updated_at": "2023-11-13T19:53:11.214Z", - "page_count": 1, - "projects": [215836], - "original_extension": "pdf", - "file_hash": "080bbaefc55170f72feb1cfb7ca26107a560ca23", - "noindex": false, - "edit_access": false, - "notes": [], - "highlights": { - "page_no_1": [ - "The Energy \nAudit is to provide Boston Public Schools with a baseline of energy usage, for both \nrenewable and non-renewable Energy Conservation Measures to reduce carbon \nemissions. " - ] - }, - "data": {}, - "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/24164580-boston-green-academy_en" + "canonical_url": "https://www.documentcloud.org/documents/23879788-1723-boston-rules-on-negroes-boston-common", + "note_highlights": { + "2362326": { + "title": [ + "Boston rules: \"No Indian Negro or Molatto Servant or Slave...Shal abide there after Sun Sett\"" + ] + } + } }, { - "id": "22393407", - "user": { - "id": 20080, - "avatar_url": "https://cdn.muckrock.com/media/account_images/22_MuckRock_2018_PRELIMANRY_EDITS_DSC_5387_2018_Derek_Kouyoumjian_preview_SfuGGnJ.jpg", - "name": "Mitchell Kotler", - "organization": 125, - "organizations": [10000, 3168, 125, 41248, 10002], - "admin_organizations": [10000, 3168, 125, 41248, 10002], - "username": "mitch", - "uuid": "8136b9b8-95b9-4302-950d-5402e9065978", - "verified_journalist": true - }, - "organization": { - "id": 125, - "avatar_url": "https://cdn.muckrock.com/media/org_avatars/logo.png", - "individual": false, - "name": "MuckRock Staff", - "slug": "muckrock", - "uuid": "97109cc6-e52e-41e7-adb7-834ab7c6819c" - }, + "id": "1513002", + "user": 1083, + "organization": 13, "access": "public", "status": "success", - "title": "VISIT TO BOSTON", - "slug": "visit-to-boston", - "source": "CIA CREST Database", + "title": "Data Agreement between Uber and Boston", + "slug": "final-city-data-agreement-boston-uber-011215", "language": "eng", - "created_at": "2022-09-14T02:21:35.649Z", - "updated_at": "2022-09-14T02:21:48.015Z", - "page_count": 1, - "projects": [209284], + "created_at": "2015-01-29T22:39:04.497Z", + "updated_at": "2020-11-10T19:28:47.819Z", + "page_count": 7, "original_extension": "pdf", - "file_hash": "cfcb07abd75d86f9b47a2c2080d6d0903fb88ce9", + "file_hash": "216b9e697fd04e828b7f7d1f7cc0d4485c38d9a8", "edit_access": false, - "notes": [], + "notes": [ + { + "id": "201412", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Scope of Uber ridership", + "created_at": "2015-01-29T22:45:19.389Z", + "updated_at": "2020-11-10T19:29:00.841Z", + "content": "Although Uber has provided statistics about its driver base in Boston, including how much they work and earn, little is known about the level of service it provides.", + "page_number": 0 + }, + { + "id": "201411", + "user": 1083, + "organization": 13, + "access": "public", + "title": "Boston will notify Uber", + "created_at": "2015-01-29T22:43:57.436Z", + "updated_at": "2020-11-10T19:29:00.841Z", + "content": "Under the agreement, the City of Boston has to tell Uber if it receives a request for the data.", + "page_number": 1 + } + ], "highlights": { "page_no_1": [ - "Santzed Copy Approve for Relea 2078052 CA RDPETROOSZERC0200120023-4\nhe oiecron oF\ncenteaL meiGENCe\n\n| PL, He to. 7481-63\n| [— 1 octiner 1083\n1\n\nWIE TO: Charles vatermin WT 10: charles Vatersan\n® oi wren omer on tn toner\n\nSECT © Vist to boston Seer: visit to toston\n\n. oistribution:\n| plan to te 10 Boston, October Lath ibtion:\n\nana She\" lcs best Eurpean affairs Ee\n\ntar speek 51 Shares ovens\n\nic hubing ers Putnas st Rarvard, Robert 112 Mri chore\n\nPipette riiits 1 2 dori\n\nen Mop ManR §iT\n\nnea , Via SAT\n\nind\nWith Rouner\nwomore\nIGE TE wo\nSE ———\n\f" - ] - }, - "data": { - "url": [ - "https://www.cia.gov/library/readingroom/document/cia-rdp87r00529r000200130023-4" + "Agreement\nBetween Uber Technologies, Inc. and the City of Boston\nOn the Provision obeer City Data\n\nThis Agreement is entered into this 12m day of January, 2015, between the City of Boston\n(hereinafter the ?" ], - "file": [ - "https://www.cia.gov/library/readingroom/docs/cia-rdp87r00529r000200130023-4.pdf" + "page_no_3": [ + "representatives to execute this Agreement on\n\nCITY OF BOSTON\nBy: \nprimed: Jascha Franklin-Hodge\n\nTitle; Chief Information Officer\n\nAPPROVED AS 10 FQRM\n. \n\n.- r15\" \n\"1(9qu 1\" arr?) " ], - "collection": ["General CIA Records"], - "content_type": ["MEMO"], - "document_type": ["CREST"], - "document_number": ["CIA-RDP87R00529R000200130023-4"], - "sequence_number": ["23"], - "publication_date": ["October 14, 1983"], - "release_decision": ["RIPPUB"], - "document_page_count": ["1"], - "document_creation_date": ["December 22, 2016"], - "document_publication_date": ["May 26, 2010"] + "page_no_5": [ + "Dorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDorchester\nDowntown\nDowntown\nDowntown\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nEast Boston\nFenway\nFenway\nFenway\nFenway\nFenway\nFenway\nFenway\nFenway\nFenway\nHarbor Islands\nHyde Park\nHyde Park\nHyde Park\nHyde Park\nHyde Park\nHyde Park\nHyde Park\n\nCensus Tract 910.01\nCensus Tract 911\nCensus Tract 912\nCensus Tract 913\nCensus Tract 914\nCensus Tract 915\nCensus Tract 916\nCensus Tract 917\nCensus Tract 918\nCensus Tract 919\nCensus Tract 920\nCensus Tract 921.01\nCensus Tract 922\nCensus Tract 923\nCensus Tract 924\nCensus Tract 303\nCensus Tract 701.01\nCensus Tract 702\nCensus Tract 501.01\nCensus Tract 502\nCensus Tract 503\nCensus Tract 504\nCensus Tract 505\nCensus Tract 506\nCensus Tract 50?\n" + ], + "page_no_7": [ + "Roxbury\nRoxbury\nRoxbury\nRoxbury\nRoxbury\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\nSouth Boston\n\nSouth Boston Waterfront\nSouth Boston Waterfront\n\nSouth End\nSouth End\nSouth End\nSouth End\nSouth End\nSouth End\nSouth End\nSouth End\nSouth End\nWest End\nWest End\nWest Roxhury\nWest Roxbury\nWest Roxbury\nWest Roxbury\nWest Roxbury\nWest Roxbury\nWest Roxbury\n\nCensus Tract 820\nCensus Tract 8221\nCensus Tract 904\nCensus Tract 906\nCensus Tract 9803\nCensus Tract 601.01\nCensus Tract 602\nCensus Tract 603.01\nCensus Tract 604\nCensus Tract 605.01\nCensus Tract 607\nCensus Tract 608\nCensus Tract 610\nCensus Tract 611.01\nCensus Tract 612\nCensus Tract 9812.01\nCensus Tract 606\nCensus Tract 9812.02\n\nCensus Tract 703\n\nCensus Tract 704.02\nCensus Tract 705\nCensus Tract 706\nCensus Tract 707\nCensus Tract 708\nCensus Tract 709\nCensus Tract 711.01\nCensus Tract 712.01\nCensus Tract 203.01\nCensus Tract 203.03\nCensus Tract 1106.01\nCensus Tract 1301\nCensus Tract 1302\nCensus Tract 1303\nCensus Tract 1304.02\nCensus Tract 1304.04\nCensus Tract 1304.06\n\n25025082000\n25025082100\n25025090400\n25025090600\n25025980300\n25025060101\n25025060200\n25025060301\n25025060400\n25025060501\n25025060700\n25025060800\n25025061000\n25025061101\n25025061200\n25025981201\n25025060600\n25025981202\n25025070300\n25025070402\n25025070500\n25025070600\n25025070700\n25025070800\n25025070900\n25025071101\n25025071201\n25025020301\n25025020303\n25025110601\n25025130100\n25025130200\n25025130300\n25025130402\n25025130404\n25025130406\n\n" + ] }, + "data": {}, "asset_url": "https://s3.documentcloud.org/", - "canonical_url": "https://www.documentcloud.org/documents/22393407-visit-to-boston" + "canonical_url": "https://www.documentcloud.org/documents/1513002-final-city-data-agreement-boston-uber-011215", + "note_highlights": { + "201411": { + "title": ["Boston will notify Uber"], + "description": [ + "Under the agreement, the City of Boston has to tell Uber if it receives a request for the data." + ] + }, + "201412": { + "description": [ + "Although Uber has provided statistics about its driver base in Boston, including how much they work" + ] + } + } } ], - "escaped": false + "escaped": false, + "debug": { + "text_query": "(boston) _query_:\"{!join from=document_s fromIndex=notes to=id score=total v='+type:note +(access:public OR user:1020) +(title:(boston) description:(boston))' }\" _query_:\" +( ( (user:1020 OR projects_edit_access:(911 212458 215823 212199 215229 215525 217646 215836 217855 216360 6909 214482 45565)) AND access:(private organization) ) OR (access:(public organization) AND organization:(19198 170 125)) ) +{!join from=document_s fromIndex=notes to=id score=total v='+type:note +(access:organization) +(title:(boston) description:(boston))'} \" ", + "qtime": 1864, + "fq": [ + "!access:invisible", + "filter(access:public AND status:(success readable)) OR (user:1020) OR (access:organization AND organization:(19198 170 125)) OR (projects_edit_access:(911 212458 215823 212199 215229 215525 217646 215836 217855 216360 6909 214482 45565))" + ], + "sort": "score desc, created_at desc, id desc", + "hl": "on", + "hl.highlightMultiTerm": "true", + "rows": 25, + "cursorMark": "*", + "uf": "* _query_ -projects_edit_access", + "qq_user": 1020, + "notes.qq_user": 1020, + "qq_organizations": "19198,170,125", + "qq_projects": "911,212458,215823,212199,215229,215525,217646,215836,217855,216360,6909,214482,45565" + } } diff --git a/src/lib/api/types.d.ts b/src/lib/api/types.d.ts index d0beb2578..8ac1a6c18 100644 --- a/src/lib/api/types.d.ts +++ b/src/lib/api/types.d.ts @@ -19,6 +19,11 @@ export type Sizes = "thumbnail" | "small" | "normal" | "large" | "xlarge"; export type Highlights = Record; +export interface NoteHighlight { + title: string[]; + description: string[]; +} + type AddOnCategory = "premium" | string; interface AddOnProperty { @@ -123,7 +128,7 @@ export interface Document { // present in search results when query includes hl=true highlights?: Highlights; - note_highlights?: Record; + note_highlights?: Record; } export interface DocumentResults extends Page {} diff --git a/src/lib/components/documents/NoteHighlights.svelte b/src/lib/components/documents/NoteHighlights.svelte new file mode 100644 index 000000000..d78bc2e06 --- /dev/null +++ b/src/lib/components/documents/NoteHighlights.svelte @@ -0,0 +1,70 @@ + + + + +{#if count > 0} +
+ {$_("document.matchingNotes", { values: { n: count } })} + + {#each Object.entries(note_highlights) as [note_id, highlight]} + {@const note = notes.get(note_id)} +
+ {#if highlight.title} +

{@html sanitize(highlight.title.join("\n").trim())}

+ {/if} + + {#if highlight.description} + {#each highlight.description as segment} +

{@html sanitize(segment)}

+ {/each} + {/if} + +
{$_("document.noteLink")} + +
+ {/each} +
+{/if} + + diff --git a/src/lib/components/documents/ResultsList.svelte b/src/lib/components/documents/ResultsList.svelte index e701b6619..269121e7a 100644 --- a/src/lib/components/documents/ResultsList.svelte +++ b/src/lib/components/documents/ResultsList.svelte @@ -20,6 +20,7 @@ import DocumentListItem from "./DocumentListItem.svelte"; import Empty from "../common/Empty.svelte"; import Flex from "../common/Flex.svelte"; + import NoteHighlights from "./NoteHighlights.svelte"; import SearchHighlights from "./SearchHighlights.svelte"; export let results: Document[] = []; @@ -97,8 +98,13 @@ /> + {#if document.highlights} + + {/if} - + {#if document.note_highlights} + + {/if} {:else} diff --git a/src/lib/components/documents/SearchHighlights.svelte b/src/lib/components/documents/SearchHighlights.svelte index 4ff07d04f..f6830ec4a 100644 --- a/src/lib/components/documents/SearchHighlights.svelte +++ b/src/lib/components/documents/SearchHighlights.svelte @@ -12,18 +12,19 @@ --> {#if count} @@ -44,7 +49,7 @@

{$_("document.page")} {number}

{#each segments as segment} -

{@html segment}

+

{@html sanitize(segment)}

{/each}
{/each} diff --git a/src/lib/components/documents/stories/NoteHighlights.stories.svelte b/src/lib/components/documents/stories/NoteHighlights.stories.svelte new file mode 100644 index 000000000..4526b46a4 --- /dev/null +++ b/src/lib/components/documents/stories/NoteHighlights.stories.svelte @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/src/lib/components/documents/stories/SearchHighlights.stories.svelte b/src/lib/components/documents/stories/SearchHighlights.stories.svelte index ff33dd11f..69a3eeeba 100644 --- a/src/lib/components/documents/stories/SearchHighlights.stories.svelte +++ b/src/lib/components/documents/stories/SearchHighlights.stories.svelte @@ -12,16 +12,16 @@ export const meta = { title: "Components / Documents / Search Highlights", - component: highlights, + component: SearchHighlights, tags: ["autodocs"], parameters: { layout: "centered" }, }; - + - +