-
Notifications
You must be signed in to change notification settings - Fork 77
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
Updating UI to also fit on mobile devices. Fix #34 #56
Conversation
Thanks for your contributions! I was going to suggest to move forward with your approach, make it work on mobile first and then see what to do for desktop. I added you as a collaborator. Depending on how you prefer to work, I would suggest that we merge this PR now and you commit straight to the master branch of the main repo - unless you feel like discussing first. What do you think? |
I'd prefer to finish everything before merging it, because many things are broken yet and it does not work really well on mobile. Plus, if you could reread/review the PR before getting merge I would be more comfortable with it :-). |
Ok, fine by me. |
@@ -83,6 +81,12 @@ | |||
"url-search-params": { | |||
"main": "build/url-search-params.js" | |||
}, | |||
"font-awesome": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
font-awesome
seems to be addes twice now (I switched to Font Awesome in b108efa for v0.6.0)?
8b7f840
to
7a3f7f2
Compare
9021ea6
to
d7e3bc4
Compare
a69f721
to
f8f3421
Compare
Thanks for the update. Regarding the elevation graph, I generally prefer using and ideally contributing to external plugins as much as possible. The Leaflet.Elevation code does need some refactoring, but I'm not sure a complete rewrite would be a better solution (but I also don't know D3 well enough to judge). I guess the main issue was having a responsive graph that adjusts to the screen size, but haven't looked at how hard it would be to add that to the Elevation plugin. Just saw there is some ongoing work in PR #66 - Elastic width that might allow just that? Let me know if you want a second opinion or some help. |
Yeah I agree for the elevation graph - I reverted to Elevation plugin for now, and played a bit with PR66: |
9c0c834
to
aed5fd6
Compare
OK so I finally was able to move pretty quickly on the remaining items, I'd be happy if you could test and/or review it @nrenner :-). |
5c3fd41
to
9939806
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left problems
// map.addControl(new BR.Control({ | ||
// heading: '', | ||
// divId: 'header' | ||
// })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that has to be fixed. Not sure how though since I don't know what BR.Control is supposed to look like.
m1._routing.nextLine._updateStyle(); | ||
|
||
console.log("TODO: fixme! //m1._routing.nextLine._updateStyle()"); | ||
// m1._routing.nextLine._updateStyle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing I wasn't able to fix. Due to leaflet upgrade from 0.7.x to 1.x, this function appears not to exist anymore but… any help welcome about how to fix that because I couldn't find the solution so far!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix in commit Use setStyle instead of _updateStyle doesn't seem to have been merged into the PR branch?
I'll need that too. When the elastic width is done, I am planning to CTRL+C CTRL+V the code to also make an elastic height, and on top of this, I'll built the feature to show/hide the elevation graph. Nevertheless it would be great if we could merge our power to deliver this features! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another left problem.
</ul> | ||
<form class="navbar-form"> | ||
<div class="form-group"> | ||
<select class="selectpicker show-tick" id="profile-alternative" multiple> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing to fix is the CSS for this form. It should looks like this:
But instead looks like this:
It looks like the CSS is not loaded (gulp
problem?) or CSS issue. I'm not much familiar with these so some help would be greatly appreciated here :-). Also it should be probably tweaked a bit to look good on black navbar.
Yeah for now I'm hacking it a bit: $('#elevation-btn').on('click', function (event) {
$('.elevation').is(':visible') ? el.removeFrom(map) : el.addTo(map)
}); But we should definitely work together on these (though I have no much skills :)). |
c0bd570
to
8cf2e6b
Compare
Great! It might take me some time to go through this huge PR. The first obvious thing is that the map doesn't show in Chrome (map height is 0). Can you reproduce this in the Chrome Browser? |
8cf2e6b
to
d30a8d8
Compare
Yeah sorry, forgot to fix that - it's done now. |
Now I see a map, but the 100% map height is taking up the total screen height, so the diagram and the footer are below the visible screen (with scrollbar). Don't know if related, the Leaflet control buttons have mobile styling applied (larger buttons with border) on desktop in Chrome. Firefox is fine. (Also see inline comment for missing setStyle commit (others?)). Still looking into the rest... |
d30a8d8
to
f6d30cc
Compare
I need to make more tests for Chrome - I basically did everything on Firefox. |
OK so I finally rearranged all CSS related to flexbox - it should be OK now! |
f6d30cc
to
d7e476d
Compare
Will this wonderful interface be available in the online version of brouter? Thx for this gorgeous work :-). |
I am trying to finish the port for mobile support (#34). So far here are the remaining issues I noted (feel free to edit the list if you find anything else).
active
state.cancel
button and use the same logic as the Draw button instead. WON'T FIX - actually it is not the same thing (canceling vs finishing).Currently it looks like this:
Left to do:
updateStyle
applied on segment when a node is moved