Skip to content

@datawheel/canon-cms@0.8.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@davelandry davelandry released this 24 Sep 16:18
· 2316 commits to master since this release

Canon CMS 0.8 Release

Major Features

Multilingual Search

Canon CMS 0.8 makes use of the new olap-client to handle both mondrian and tesseract connections. If your cube has language annotations, the CMS will automatically import different languages into the search table based on your CANON_LANGUAGES env var. The /api/search endpoint has been changed accordingly, allowing for a ?locale=<locale> parameter to be set to restrict your searches by language.

Flickr Image Management

The new Meta Editor tab of the CMS allows users to choose flickr images for search members, either by direct link or by searching for a keyword. In both cases, images with restrictive licenses will be rejected. All images are hosted on Google Cloud Storage. Many many thanks to @perpetualgrimace for doing the lion's share of the UX here.

See the README for information on how to configure google cloud storage and image management.

Images will automatically be rendered in the "Hero" section of a profile, which is automatically created upon profile creation. However, if you need direct access to the hosted images, they are reachable via:

/api/image?slug=<slug>&id=<id>

Images default to splash size, but you may set &size=thumb for a thumbnail. To retrieve metadata about the image rather than the image itself, add &type=json to the params.

Member Management

The Meta Editor tab also allows users to set a comma-separated list of keywords for a given search member (e.g., mit,cambridge for Massachusetts Institute of Technology). Additionally, one may set "language hints," a javascript lookup object to assist in the rendering of language-specific rules on the front-end.

Visualization Variable Override

Javascript in vizes now has the ability to call a setVariables function, which will inject whatever key/value pairs you provide into the overall variables object of the Profile page. This useful if you want visualization click events to cause other events to happen on a profile. For example, if you have a Visualization with a set of products, and you want to be able to click a product and spawn a new visualization based on that product:

  1. Create a variable called showSecondaryViz in a Materializer, and set it to false.
  2. In the onClick for your first viz, add something like: d => setVariables({secondaryID: d.id, showSecondaryViz: true})
  3. In the configuration for your second viz, set it's "Visible" property to showSecondaryViz, and make use of variables.secondaryID in your viz configuration.

Migration

As usual, migrating to this new version will require a database migration script. Instructions are in the README.

Corresponding Issues

Closes #701
Closes #700
Closes #698
Closes #697
Closes #659
Closes #695
Closes #642
Closes #636
Closes #471

Full Changelog
  • Merge pull request #703 from Datawheel/feature-multisearch (7b48bd2)
  • Merge branch 'master' into feature-multisearch (abbe3fb)
  • removes transparent png (871a584)
  • amends readme for migration script count (2aec042)
  • moves tons of callbacks to context where they belong (c893d13)
  • reverts filename creation in Options.jx to use separate arg for extension (37d780a)
  • adds favico back into helmet (f93f397)
  • removes image column entirely from metaeditor if flickr not configured (04b05d9)
  • small text cleanups and whitespace removal (5b196e3)
  • doesn't load image libraries unless flickr api key is configured (40e7621)
  • removes legacy datausa image route and documents image access (d1362f1)
  • moves base58 calc from front-end to back-end (abf84df)
  • adds shell exits and better logging to migration scripts (c08d174)
  • removes request library, uses pure axios (f85b2e8)
  • removes favico placeholder in helmet (013ef57)
  • removes imageRoute file (bdfcd49)
  • Update README.md (08ad6e9)
  • adds viz breakout for #695 (9c73b10)
  • adjusts hero image credits sizing (344041f)
  • ensures there are sections to loop through; closes #700 (313768c)
  • adds toggleable image credits to Hero section; closes #701 (3b38974)
  • tweaks add profile/story button style (5689bc0)
  • adds hero images to profiles (c2ca490)
  • restores HMR in profiles (a01c5ab)
  • improves preview search by including names and memberslugs (a18e2af)
  • adds meta image import message; closes #636 (71b3c4b)
  • adds meta image search interaction styles (d4084a0)
  • styles meta image searching state, disables search input during search (a1565ee)
  • hides settings menu entirely when there are neither locales nor auth (c5c7e35)
  • updates package lock (3fcc5cf)
  • fixes olap bug to handle both mondrian and tessearct ID structs (d9f678c)
  • adds image data to hero section for #697 (8f90498)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (4945fb6)
  • fixes default favico path to not interfere with profile routes (8b18176)
  • fixes indentation bug for new sections (6376dfe)
  • makes first added section a Hero by default (6fb1bff)
  • fixes search regression with dimensions (7e182ae)
  • fixes bug with empty search and fixes url ordering (45ecaad)
  • styles meta image dialog (bf90071)
  • adds image refresh for #698 (a51a29a)
  • sizes current image in meta image popover (3aa611f)
  • styles meta table disabled pager buttons (90cff3d)
  • replaces flickr gallery buttons & inputs with canon field components (bfd78c6)
  • makes flickr image gallery responsive (4304852)
  • converts flickr image pagination to load more pattern (79c7a11)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (7422026)
  • fixes meta table no data message (507d588)
  • restores dark-mode media query (lol) (5c024ee)
  • moves meta table filters to sidebar (04296d7)
  • fixes nav ghost border, makes nav a bit less brittle (31e9135)
  • improves meta table editable text affordance, tweaks column widths (619bda5)
  • adds clickable settings menu overlay (464b8b8)
  • hides primaryLocale indicator when the secondary locale is set to none (70747d8)
  • styles meta table images (efefa0a)
  • Merge remote-tracking branch 'origin/feature-multisearch' into feature-multisearch (44f2b3c)
  • adds thumbs to member table (8229b3f)
  • groups related meta table columns (7a0437d)
  • adds comments and sorting for slugs (5fcb734)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (9c5e73f)
  • changes to olap-client, adds multilang, zvalue still broken (e570a54)
  • styles the dang react-table pager (a99ba17)
  • adjusts react-table page size (9a28f59)
  • page limits react-table so members will render (f798e4d)
  • removes magic number math from meta table (60ac053)
  • removes console log (422939e)
  • restores HMR (e7daedd)
  • renames Members panel to Metadata (aa5913f)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (752bb28)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (1924d1b)
  • updates canon, hot-reloads Builder, and adds slug unique catch (cf4cbe9)
  • removes db linking cruft (d3d271a)
  • updates package lock (b71d8e0)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (0311857)
  • bumps canon version (42eb30f)
  • adds dim/hier check to filtering, closes #690 (f316642)
  • rewrites dimension filter for clarifty (41608a9)
  • adjusts dimension/subdimension filter (0e98157)
  • changes filters for dim/subdim (fd7ee9b)
  • further tweaks member table style (a9780ca)
  • adds member table render functions & adds dark mode style (fc763d1)
  • tweaks members table style (1a6b45f)
  • imports the dang mixins file (74c5631)
  • styles members header (01152ff)
  • reverts new profile/story button placement (220b91b)
  • adds pagination to image search (1c9bdd9)
  • adds loading for image search (ad14f7a)
  • handles both manual entry and image select (12a9ae1)
  • separates old and new flickr images (cfc82f7)
  • adds rudimentary flickr clicker (3ca15b1)
  • begins to flesh out flickr apifor previews (9ff8691)
  • adds rudimentary flickr search route (47b8545)
  • includes selectors in migration, fixes memberbuilder error (215dea3)
  • fixes image and search migrations (c38aea6)
  • removes display from search population (3da8143)
  • adds script to npx and adds _content migrations for 0.8 (54603b5)
  • begins 0.8 migration script (4f9badb)
  • adds migration script files (af49477)
  • improves filtering for memberbuilder (854c9ce)
  • fixes bug with rendering (df25e2a)
  • brings in attr and keywords to member pane editor (e56b90e)
  • allows for editing image meta in member editor (1b46c35)
  • begins to set up editable cells for meta and keywords (862aa3e)
  • adds meta lang columns to member browser (3bf7eaf)
  • adds translated names to members chart (522dcb1)
  • adds better filtering to members page (5af2fde)
  • adds spinner while loading flickr data (29598ad)
  • fixes image rename, fifth time is a charm (80c5d10)
  • renames js file (127b9b3)
  • actually fixes renaming bug (dcae0de)
  • fixes renaming bug (ff6d076)
  • renames images to image in db (72daa87)
  • renames image route and adds json mode (43d7be8)
  • changes all references in db from lang to locale for consistency (fb13896)
  • moves meta to locale-based table (90aba83)
  • allows for configuring image sizes (425b7d3)
  • adds attr to results payload (4de79ae)
  • adds new image fetching route (0b326d3)
  • removes tmp package (5e8e5ee)
  • moves bucket to env var, removes writing to filesystem (facfd73)
  • cleans up routes, adds links to search results (39a6d2f)
  • removes link column, fixes pathing for cloud uploads (44216c4)
  • hooks up image upload (fb21fc3)
  • adds tmp package and configures gcloud upload (c982360)
  • adds google cloud package (0709b24)
  • fetches flickr sizes, preps for cloud upload (55624f7)
  • adds sharp, creates flickr endpoint, preps for gcloud (88e4bde)
  • adds flickr-sdk to package (a91b6a7)
  • fixes reserved word column name and updates rows locally on post (4d261c3)
  • adds link column to images (7769026)
  • adds update route for search rows (8e9bc01)
  • adds all fields and sorting to member table (bdf3964)
  • adds in filters and basic ilsting (a01c052)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (ce6f178)
  • adds members tab and creates searchall api endpoint (3d3875f)
  • updates searchRoute to respect locale (a8d83ea)
  • fixes bug with assocation, makes ingest respect lang (e767e9f)
  • fixes unique constraint (dfe0e47)
  • fixes content autoincrement (78cf467)
  • Merge branch 'master' of http://github.com/datawheel/canon into feature-multisearch (9da0f46)
  • adds unique key for search content (dff1976)
  • reorganizes search tables (378a7c7)