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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use and doc the default input UI of maplibre-js #186

Open
DerKarlos opened this issue Oct 25, 2022 · 6 comments
Open

Use and doc the default input UI of maplibre-js #186

DerKarlos opened this issue Oct 25, 2022 · 6 comments
Labels
rfc Request for Comments

Comments

@DerKarlos
Copy link

To welcome the maplibre community to the Rust version, we should offer the same controls as they used to.
So we have to check, what controls are used, document and code them in our input control.

馃敠 Context

The input controls are not documented. Here one can try them: https://demotiles.maplibre.org/terrain-tiles
There is the code (with some doc to): https://github.com/maplibre/maplibre-gl-js/tree/main/src/ui/handler

1st-mousekey, arrow-keys: shift=move=slide=pan the map 100 pixels. (No ADWS-kleys are used)
2nd-mousekey, arrow-keys+shift: rotate the camera-viewangles: direction (15) and up/down (10 degrees)
mousewheel, plus-key=equal-key/minus-key: zoom in/out 1 level, or 2 if shift is pressed

1-fingerr-tab: zoom in, double-tab: zoom out
1-finger-touch: shift
2-finger-touch: shift(move) + zoom(pinch) + rotate-direction(twist)
2-finger-touch: rotate-up/down(move) *)
*) This mode gets only active if the 2-finger-move-up/down is used first! It blocks pinch and twist and shift-left/right.

馃捇 Examples

We could document the default input UI in https://github.com/maplibre/maplibre-rs/tree/main/docs/src

@DerKarlos DerKarlos added the rfc Request for Comments label Oct 25, 2022
@maxammann
Copy link
Collaborator

I would love to see an RFC for input handling for maplibre-rs.

RFC would serve as a design foundation. They would describe what we want maplibre-rs to be like on a high level. Here is the RFC for the "RFC Process" of Rust: https://rust-lang.github.io/rfcs/0002-rfc-process.html

I would very much like to see us documenting how maplibre-rs works in the style of RFCs.
RFCs can be documented in the maplibre-rs book: https://maplibre.org/maplibre-rs/book/

What do you think?

@maxammann
Copy link
Collaborator

This would be an excellent first try for that!

@maxammann
Copy link
Collaborator

Oh I just saw that you opened this issue as RFC! Excellent!

Should we turn this into a PR right away and create an RFC section in the Rust book for that? (I have to look again into Rust's process)

@DerKarlos
Copy link
Author

Sounds good, go ahead. So I will see the process working.
Do I always have to start with an Issue/PR if I intend to add a chapter like "Appreciations" to the Doc?
Or is the RFC only used for new features?
In a Wiki multiple contributors could just edit a draft, how to do it, a pull request with many merges into it?
Pleas just start and show my the steps.

@maxammann
Copy link
Collaborator

So RFC would probably not use Github Issues, but only Github PRs:

Fork the RFC repo https://github.com/rust-lang/rfcs
Copy 0000-template.md to text/0000-my-feature.md (where 'my-feature' is descriptive. don't assign an RFC number yet).
Fill in the RFC
Submit a pull request. The pull request is the time to get review of the design from the larger community.
Build consensus and integrate feedback. RFCs that have broad support are much more likely to make progress than those that don't receive any comments.

(from the RFC RFC)

Usually only a single person edits an RFC and others comment. If working in a team on a PR then people can create suggestions in the PR and the PR owner or admins can accept them.

The Wiki is a Github only feature and I would like to avoid using more proprietary features of Github and lock ourselfes in. Also the Wiki lacks a way of doing a proper review process.

@maxammann
Copy link
Collaborator

Possibly duplicate of #91.
The two issues can probably be merged.

@DerKarlos can you copy all the important things over to #91? Then close this one.

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

No branches or pull requests

2 participants