Repository navigation
#32 autocomplete keyboard - #88
Conversation
| <input | ||
| className={styles.input} | ||
| type='text' | ||
| type="text" |
There was a problem hiding this comment.
maybe the code formatting settings were off here?
There was a problem hiding this comment.
I think in HTML-Tags, the formatting uses ". Everywhere else ' is used.
There was a problem hiding this comment.
Hm, when I run 'Reformat Code' in IntelliJ it changes the quotes to single quotes
There was a problem hiding this comment.
Ugh sorry, I did not know 'Reformat Code' and 'Reformat with Prettier' are two different commands even after enabling the Prettier code style: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360002745119-How-to-have-Reformat-Code-feature-behave-exactly-like-Prettier-
Using Reformat with Prettier the quotes are actually changed to double quotes, unless I add "jsxSingleQuote": true to prettierrc.
| } | ||
|
|
||
| private static filterDuplicates = function(hits: GeocodingHit[]) { | ||
| private static filterDuplicates = function (hits: GeocodingHit[]) { |
There was a problem hiding this comment.
Yes, this is weird.
There was a problem hiding this comment.
This also seems to be different for IntelliJ 'Reformat Code' and 'Reformat with Prettier'. The first removes the space and the latter adds it...
What is your workflow for this? Normally I sometimes press 'Alt+Shift+L' to reformat the code in case I want it to be formatted, but then I am just using the 'Reformat Code' checkbox in the Git commit Dialog to make sure whatever I am committing is formatted correctly. I could easily remap the shortcut to the 'Reformat with Prettier' action, but unfortunately there is no equivalent before commit action in the commit dialog. So I would have to setup some kind of external pre-commit logic to achieve the same effect. Or maybe tweak the IntelliJ reformat code rules to match the prettier style (but that seems rather fragile).
There was a problem hiding this comment.
I have set prettier to reformat the code on safe. So basically every file which I'm about to commit is already properly formatted.
What I'm missing though is automated import optimization. This is something the commit dialog also does for me, but with prettier reformatting on save things get tricky because intellij removes unused imports before the commit, then saves, then prettier kicks in and then I get a warning, that the files I'm about to commit have changed...
The way I have it now, is that I don't do any auto-reformating on commit, but only run code inspection. IntelliJ warns me about unused imports and I remove them manually. It doesn't happen too frequently, but I find it still anoying that I have to take care of imports.
There was a problem hiding this comment.
Ok thanks, I'll try this as well then. We probably need to re-format the entire code base again then, because when I did this I used 'Reformat code' instead of 'Reformat with Prettier' because I did not know they weren't the same... Maybe this is also why @karussell saw different formatting when using prettier in vscode...
This is also a problem on old GraphHopper Maps and will be fixed once the latest shared-outdoor is deployed (that removes some custom profiles that I wanted to test out) |
This is because we have three errors coming from the backend. The Error handler just connects each error with an "and". This could be improved in general. Together with unhelpful messages if no route was found. Related to #70 |
I don't think so. Why trigger anything if nothing has changed? |
Ah ok, so let's fix this in #70 then.
Hm, my use-case is often debugging (I need to trigger the request to check something on the server-side). So rather special I know :) But then again, as a user I also somehow feel like I want to 'control' the app, so in case I push Enter I expect something to 'happen'... For example when I move the map, pushing Enter should also scroll the map back to the path (?) |
Okay this makes sense then. Doing it from within the address search component is not so trivial though. Which behaviour do we want in this case? Simply try to use the text-input's content as coordinate? Only if it has changed since the last time? Or should the Enter -> Search thing be a more global thing? Also, should the search be triggered only in case an input box is highlighted or again at any time? While writing this it sounds like this is a global functionality. If it is okay for you, I would put this off until later and put it into another issue. Otherwise we have to discuss first I guess. |
|
Sure! This PR already improves so many things, no need to do everything at once. |
* Navigate geocoding results with arrow keys * Leave full screen on Esc * Fix broken border around geocoding autocomplete * Add debounce to geocoding * remove logging * Clean up AddressInput.tsx


fixes #32
fixes #54
fixes #69
Overhauled the Address Input Component.