-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In-browser place editor off master #620
Conversation
f693204
to
7edc654
Compare
Passing the reset option seems to elimiate the problem of directly-loaded landmarks causing a portion of the map to initially not be rendered and the center of the map to be displayed incorrectly. Fixes: #504
Make sure we reset the dynamic form state if we navigate away from a rendered form (say, to the list view). Otherwise, it's possible to corrupt the form's state by returning to the form after navigating away.
This commit adds the following functionality: - Polygon and linestring geometry creation via the dynamic form - Polygon and linestring geometry editing via the detail view editor - Geometry fill and opacity control It introduces dependencies on: - The Spectrum jQuery colorpicker library - The leaflet-draw plugin Addresses: #410
- Move lib and css files out of old sa_web folder - Fix merge errors
501fb2a
to
5a80e06
Compare
62ca4d9
to
d83cf19
Compare
c8ae47a
to
be9d1b3
Compare
…currentUser credentials
…cting with other on destroy listeners
…e in-browser editor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good. Willing to help with the README stuff if necessary.
README.md
Outdated
<DATASET-ID>_SITE_URL=https://path/to/dataset/ | ||
<DATASET-ID>_DATASET_KEY=dataset_key | ||
DATASET-ID_SITE_URL=https://path/to/dataset/ | ||
DATASET-ID_DATASET_KEY=dataset_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll have to merge this change with the new README. Also, can you explain the thinking behind removing the angle brackets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't quite remember why we decided to remove the angle brackets, although I do remember having a discussion about it at some point. Do you think it's better to leave them in?
README.md
Outdated
@@ -104,6 +104,30 @@ NOTE: If you're new to programming with virtualenv, be sure to remember to activ | |||
source env/bin/activate | |||
``` | |||
|
|||
### Using the in-app editor | |||
|
|||
The platform includes an in-app editor (currently only available on the `develop` branch) that you can use to update and hide places and comments on a per-dataset basis. Only authenticated administrators are allowed to make edits. Authentication is performed via third-party social media services (Twitter and Facebook are currently supported), so administrators will need an account on either of these services to use the editor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably don't need to tell them which branches it's on, because your README change will be on those same branches.
Also, as before, you'll need to merge this into the new README. This new section should be under the Usage subheading, because its intended audience is users. Take a quick look at this to make sure you're following it.
<nav class="list-toggle-nav"> | ||
<a class="list-toggle-btn btn btn-block"> | ||
<span class="show-the-map is-visuallyhidden">{{ show_map_button_label }}</span> | ||
<span class="is-screen-reader-text">/</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the /
screen-reader-text
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block of code was relocated from base.html
as-is. It already had that slash, and I'm not totally sure why. Maybe just so the screen reader span has some content in it?
<!-- Template for the row of editor buttons visible at the top of place | ||
detail views. --> | ||
|
||
{{#if isEditable}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this, but maybe this #if
should be outside the template (wrapped around the template's use).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I debated this as well. My reasoning for having the {{#if}}
check inside the template here is that the check is integral to the way this template should behave. In other words, there's (currently, at least) no situation where we'd want to render this template without the {{#if}}
check.
class="place-value place-value-{{ name }}" | ||
alt="{{ name }}" /> | ||
<!-- {{#if ../isEditingToggled}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
- id: vision | ||
title: _(Community Vision) | ||
visibleDefault: false | ||
visibleDefault: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -997,6 +1020,50 @@ place: | |||
display_prompt: _( ) | |||
placeholder: _(Enter description...) | |||
optional: false | |||
- category: featured_place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be here?
@@ -1027,8 +1096,20 @@ place: | |||
- label: _(Other) | |||
value: other | |||
optional: true # NOTE: checkbox_big_button inputs have no validation | |||
- name: reside_work_georgetown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -1048,8 +1129,8 @@ place: | |||
placeholder: _(Enter title...) | |||
optional: false | |||
- name: description | |||
type: textarea | |||
prompt: "_(What's your question?)" | |||
type: richTextarea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -0,0 +1,8 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is sa_web
here at all?
1d97135
to
e2c8cce
Compare
eceb00a
to
a32b5c1
Compare
36a947c
to
2714b67
Compare
bf3fd07
to
e5b5b13
Compare
Addresses: #401, #410, #438, #497, #498, #499, #500, #501, #523, #525.
Not ready to merge yet
Features added:
geometryToolbar
. If a category has a form field of this type in it, geometry editing functionality will be availabletype: richTextarea
flag in the field's configuration<img>
tag inside the rich text field with thesrc
attribute set to the uploaded image urlsuppressAttachments: true
flag in a category's configform_only: true
to a form field's config to prevent the value of that field from appearing in place detail views. The value of form-only fields will still be sent to the client (unlike the values of private fields).To enable the editor mode for a dataset:
Data sets
and then the name of the dataset you'd like to enable editing for.Groups
section, create a new group calledadministrators
if it doesn't already exist. Note that this group must be calledadministrators
.Available submitters
panel and clicking the right arrow to move them to theChosen submitters
panel.Edit permissions
below the submitters panels, and grant retrieve, create, update, and destroy privileges. Also make sure that a*
character is entered in the text box at left. The help text in the admin panel suggests that this box can be left blank, but this is in fact not true.Click
Save
.Note that it is possible to add new users to an
administrator
s group even if they haven't already logged into the app via a social service. In the admin panel, clickUsers
, thenAdd user +
, then create a new user. The username must match the social service handle of the person you'd like to grant administrator access to. Then, in theUser social auths
panel, clickAdd user social auth +
, select the user you just created underUser
, enter the name of the social service provider (twitter or facebook), then enter the social user's Uid. The Uid can be looked up online: here for twitter, and here for facebook.