Skip to content
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

Feedback: Editor controls & more #24

Closed
muesliq opened this issue Dec 23, 2016 · 4 comments
Closed

Feedback: Editor controls & more #24

muesliq opened this issue Dec 23, 2016 · 4 comments

Comments

@muesliq
Copy link
Collaborator

muesliq commented Dec 23, 2016

I just test-drove v0.2.2. Wow, feels great!

What I'm missing is a bunch of editor controls:

  • Commit / enter: I would want to choose when to reload the map with all the changes I made. (In contrast to: reload it on unfocus of a form field.)
  • Undo: I would want to undo the last action. (An action history would be perfect of course at some point.)
  • Inspect: I want to be able to choose a layer by clicking onto the map. This could be onclick (interferes with zoom though, so we'd need +/- controls on the map) or on right click (context menu) or behind an "Inspect" button. (I had expected this behind the current inspect button.) Despite the zoom interference I'd probably prefer onclick.

Commit and Undo should also be assigned keyboard shortcuts.

Furthermore it would be nice:

  • if the editor would support location hashes. I want to be able to append a hash such as #10/47.2608/11.4143 to the URL, to edit a specific area of the map.
  • if one could directly edit the JSON code, too. Of course this would create the need of basic JSON error handling.
  • if templates of values used within the current style sheet would be available for form fields. (Such as in Mapbox Studio.)

And one special wish: JSON doesn't support code comments, yet it would be nice to be able to save a comment within layers, so I'll later remember what I was thinking when deciding for specific values. This could be achieved via the metadata property:

"metadata": {
        "maputnik:comment": {
            "Save here what I was thinking when creating this layer.
            },
@lukasmartinelli
Copy link
Collaborator

Awesome! Thanks a lot for the feedback Helge! That's exactly what I want.

Commit / enter: I would want to choose when to reload the map with all the changes I made. (In contrast to: reload it on unfocus of a form field.)

Could you elaborate on that?

Why is a explicit style change necessary? All changes made will always immediately in the map. Isn't that the most convenient way to do styling and also most UX friendly?

Undo: I would want to undo the last action. (An action history would be perfect of course at some point.)

Undo is on the roadmap #25.

Inspect: I want to be able to choose a layer by clicking onto the map. This could be onclick (interferes with zoom though, so we'd need +/- controls on the map) or on right click (context menu) or behind an "Inspect" button. (I had expected this behind the current inspect button.) Despite the zoom interference I'd probably prefer onclick.

Inspect mode is on the roadmap #26

if the editor would support location hashes. I want to be able to append a hash such as #10/47.2608/11.4143 to the URL, to edit a specific area of the map.

Good idea! Continues in #27

if one could directly edit the JSON code, too. Of course this would create the need of basic JSON error handling.

You mean editing the entire JSON file? Instead of editing the layer JSON spec?

Editing the layer JSON spec should work (well error handling etc is missing but as proof of concept).

if templates of values used within the current style sheet would be available for form fields. (Such as in Mapbox Studio.)

I also like the idea of templates. It is however a more advanced solution that always requires preprocessing of the style.

This is probably most useful for colors and fonts - so when we you at least can choose from a predefined defaults in the style metadata (or just show the already existing values) would be a compromise.

And one special wish: JSON doesn't support code comments, yet it would be nice to be able to save a comment within layers, so I'll later remember what I was thinking when deciding for specific values. This could be achieved via the metadata property:

That's also straightforward to implement. Let us keep that in the backlog. #28

@lukasmartinelli
Copy link
Collaborator

Commit / enter: I would want to choose when to reload the map with all the changes I made. (In contrast to: reload it on unfocus of a form field.)

This makes sense when editing JSON by hand.. there it is not comfortable if the editor reformats your now correct JSON each time.

@muesliq
Copy link
Collaborator Author

muesliq commented Jan 4, 2017

Awesome!

As to commit/enter: You are right, it's ok as it is implemented (and saves one click). However I would only apply changes on unfocus, not at every key stroke. (However those are just minor details.)

I love the new JSON edit function. This way current shortcomings as e.g. the missing control to add filters can easily be worked around.

Inspect: I actually meant stylesheet layer inspection, not source layer inspection aka X-ray view. (I didn't dare to suggest the latter as I thought that's too big a feature for an early version.) Both is implemented meanwhile, great!

We'll soon switch our editor to Maputnik, so expect some real-world feedback from me in the coming weeks :-)

@lukasmartinelli
Copy link
Collaborator

Such feedback is always great :)

As to commit/enter: You are right, it's ok as it is implemented (and saves one click). However I would only apply changes on unfocus, not at every key stroke. (However those are just minor details.)

You're right. Makes sense on loose focus #46

We'll soon switch our editor to Maputnik, so expect some real-world feedback from me in the coming weeks

Nice. I am working on styles with it now and that is actually an important part of the process to figure out whether it is actually comfortable to edit styles that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants