NUKnightLab / NUKnightLab/StoryMapJS

Editor should ensure that Zoomify width/height are set, and give better errors if the aren't

Open
#332 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
248
Forks
61
Avg merge
1m
Merged PRs (30d)
1

Description

In Zendesk 3819, a user was unable to edit a StoryMap after changing the Zoomify URL and leaving the width/height blank. (Or possibly the width and height were not blank, but the tool lost them.)

In any event, in the JSON, data['storymap']['zoomify']['width'] and data['storymap']['zoomify']['height'] were null, leading to an error when the L.Zoomify layer was initialized.

Manually editing the draft.json to add those values and putting the file back on S3 seemed to correct the problem, at least for previewing the storymap. I'm presuming the editor will also work better now.

We should improve data validation in the editor so that it's not possible to leave the 'options' panel with Zoomify set but empty values. We should also consider catching the exceptions that bubble up during the Editor initialization and making it easier for people to report those to us.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the editor's options panel and initialization path for Zoomify data, especially data['storymap']['zoomify']['width'] and height. Verify how empty values reach L.Zoomify and how initialization exceptions surface. Done means empty required dimensions are rejected with a useful error, and initialization failures are easier to report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.