iandees / wof-editor

A simple Who's on First editor.
https://writefield.nextzen.org/
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Add "open WOF doc from URL" button #1

Closed nvkelso closed 4 years ago

nvkelso commented 4 years ago

If you land on the test page it's blank. So add button at top that says "load WOF place" and accepts URL, to then reload the page with the URL param trick?

iandees commented 4 years ago

I think I finally found a decent path on this one.

The default landing page looks like this:

image

You can enter a WOF ID and it will use data.whosonfirst.org to figure out which repo to load from or you can pass in your own URL if you want to load a specific branch/fork. In either case, it redirects you to the edit page, but now instead of having a WOF ID in the URL it has an entire URL as a parameter:

image

That URL is loaded to show in the form and make edits. It uses the wof:repo property of that doc to decide which repository to make the pull request against.

nvkelso commented 4 years ago

I dig it!

The only change I'd make is to layout them top and bottom instead of side by side...

Instead of - ID | URL

Right now it looks like I should do both fields... Or you could make the find by URL just a button that prompts for the URL value with a dialog?

nvkelso commented 4 years ago

It's also confusing that the text in the boxes isn't actually text, so clicking them doesn't do anything.

nvkelso commented 4 years ago

we can add e.g.: prefix on the text you have in those boxes and call it good?

iandees commented 4 years ago

Adjusted alignment and improved placeholder text:

image

thisisaaronland commented 4 years ago

FYI:

nvkelso commented 4 years ago

@iandees formatting nit: can you add 2 lines of whitespace between the blue button Find by ID and the text Find by URL, please? Then we can close this out...

iandees commented 4 years ago

Ah, another annoyance on the Bootstrap 3 -> 4 upgrade. Gave it some bottom margin:

image

nvkelso commented 4 years ago

Works for me :)