daem-on / wtherion

A web-based Therion map editor
https://daem-on.github.io/wtherion/
MIT License
17 stars 2 forks source link

Inspect tool does not provide much information and why is it needed #18

Closed CaverBruce closed 2 years ago

CaverBruce commented 2 years ago

The inspect tool image does not provide much detail about the object that is being hovered over.

In the example below, I see it is a point station, but none of the other properties, such as 'name' are displayed. I would prefer to see something like the line this object will create in a th2 text file.

image

I generally require object property information at random times mid-drawing process. It is disruptive to click the different tools all the time just for the purposes of gaining situational awareness and verifying the properties of an object. So can we do away with the inspect tool altogether and have the position coordinates and hovered object details always updating on the bottom of the window? Just like XTherion? At a glance, the drawing and other WTherion 'modes' don't seem to make (much) use of the status area.

If continuous 'inspect' updating is perceived as a drain on resources, then maybe a control key such as Ctrl+ mouse movement or spacebar+ mouse movement could activate the 'inspect' reporting behaviour.

daem-on commented 2 years ago

Your example is interesting, because when you inspect a station, it does show the name that's been given. In your screenshot the station doesn't have a name, so nothing is displayed. I agree that it would be nice to see the exact line an object will create, but this is basically only possible with points, since both lines and areas will have multiline outputs.

The inspect tool doesn't just show the type, it can also show any other information with very little work, and its purpose is to be a user friendly quickly readable text, not the therion output. That's why it has localization and not limited to just English.

Continuous inspect isn't really optimal with how the project is set up, but it would be possible to make the inspect tool available while pressing a button and then switch back to the previous tool -- that's already how pan and zoom work. But that wouldn't even be much different from how it is right now, you can just press M, and use it, the only problem is you also have to press a key to go back to another tool.

CaverBruce commented 2 years ago

Sorry I made this issue too soon, before researching sufficiently. You are right, the point station I used as an example had no name. I like the idea of presenting 'friendly readable text' with the users localisation in this context.

Regarding multi-line statements such as lines, it is only necessary to echo the primary object definition line, such as this example from XTherion I think all objects should report a result.

image

I tried using 'M' to activate Inspect. It works, but as you imply, finding and pressing keys while looking at your drawing on screen is disruptive. I would vote for behaviour activated similarly to pan or Zoom.

Another reason I am finding Inspect difficult to use is that it is hard to get the mouse cursor sufficiently close to a object for inspect to report a result. Maybe it is because I have high res (4K) monitors? I would like the Inspect functionality to have a generous snap zone, like for example, the Item Select function.

Also I am not seeing xvi stations reported. For any xvi leg or station, I get 'unrecognised'.

image
daem-on commented 2 years ago

Is the last part still an issue after 0a0d5cd2a44fc6cab3badfe06c895a3b78a890aa? I think it should be fixed now

Otherwise the snap distance (what paper calls tolerance) can be adjusted, I think I might add a config option for it.

CaverBruce commented 2 years ago

I'm not seeing any change when using Inspect eyedropper and hovering over xvi points. I'm using this link https://beta.wtherion.daemonw.com/ which i notice is now up to c24efcd created some 7 hours ago. Looking at the various commits since https://github.com/daem-on/wtherion/commit/0a0d5cd2a44fc6cab3badfe06c895a3b78a890aa I'm not seeing changes that they seem to implement. Is that link sufficient to pick up latest beta-fixes branch changes? Or do I need to create a new drawing or clear my browser cache?

daem-on commented 2 years ago

That's the correct link, it does need to go through an update process every time, but it's automatic, so you should just check (in the about dialog) the build string says version 0.6.0 build 2022-09-04T01:07:22.151Z, because that's the latest version as of when I'm writing this. Also it's in UTC for everyone so take that into account.

CaverBruce commented 2 years ago

Here is my problem image A browser refresh does not update it, but this time reloading in a new Window did. Anyway, these are resolved:

Possible future improvements:

daem-on commented 2 years ago

Well yes, just refreshing a page is not enough to update a PWA, that's why it says "Close and reopen app to update". Regarding some other issues: the cofiguration takes effect immediately, tools only load configuration when they're switched to, so you need to switch off and back to a tool if you want it to use new settings. No reload necessary. The keybinding can of course be changed for inspect, but Ctrl is already taken by zoom, Shift is used by select but otherwise could work, and Alt was originally the zoom key but was changed because Firefox opens the toolbar if you press it.

Inspecting points/areas I've found very reliable, inspect always picks the top-most object. If you have points on top of an area they will always get picked (with tolerance), and if they are under an area, they will never be picked. Which is what an average user should expect based on what the canvas looks like. If you want to change the order of items, that's also possible with the Order menu in Select. This will also change order in the output.

Okay, I think that covers everything in this issue, see #19 for adding more to the inspect output.