Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
319 stars 157 forks source link

[Tests] Validation needed for data fields in Theme #581

Closed rudokemper closed 2 years ago

rudokemper commented 3 years ago

Describe the bug It's possible to add an online Mapbox map for a community Theme in the Administrative back end. This requires both a Mapbox style url and a Mapbox access token.

Currently, it's possible to set one of these without the other. This will result in the app not loading anything when going to the map view.

To Reproduce Steps to reproduce the behavior:

  1. Go to Theme in the administrative back end (with a username with admin privilege)
  2. Edit the theme and add a Mapbox style url.
  3. Don't add anything in Mapbox access token.
  4. Update Theme.
  5. Go to map view - it will be blank.

Expected behavior We should make it so that if Mapbox style url field has content, then Mapbox access token is required to have content as well, and vice versa.

Screenshots If applicable, add screenshots to help explain your problem. image

Additional context Add any other context about the problem here.

everly-gif commented 3 years ago

Hi @rudokemper I will like to try and resolve this. Could I work on this issue?

rudokemper commented 3 years ago

Sure, I assigned you. Thanks!

everly-gif commented 3 years ago

@rudokemper how can i access the administraive backend? is there a port number?

rudokemper commented 3 years ago

When you log in (see seed data for a sample community - think its admin@terrastories.com, pw terrastories) there is a button on the welcome screen to access it.

everly-gif commented 3 years ago

Hi right now I'm at the theme page, I was thinking a simple react validation would work for this but I can't seem to find the relevant .jsx file for theme dashboard

rudokemper commented 3 years ago

Hi, this too i would ask in the Terrastories Slack channel which I shared in the other thread.

everly-gif commented 3 years ago

cool I am already part of the slack, Right now I think I'll wait for my mentor (Ian Norris) to reply in the fellowship slack. If he's busy I'll put it up in ruby for good slack as well.