-
Notifications
You must be signed in to change notification settings - Fork 128
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
hide ple-footer when typing on small screen #464
Conversation
This does not work for tag input however. Happens the input area for tags is created with a div having a class of "tokenfield" instead of the normal input like the other inputs and text areas I'll try another way to manipulate this div, as i'm not able to do it on the same place with the jquery multiple elements selector that i had used. But if you have some pointers that can help @VladimirMikulic i'ld appreciate. |
Also this pull request takes care of hiding footer when user starts typing on small. For changing the look of the footer, i think i may need to do it on another pull request. |
You can style it in this PR as well since it is all related. Let's not create PR flood. |
Okay👍 |
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.
dist file should not have any changes. Thanks
@NitinBhasneria I did not manually make changes to the dist file. The changes resulted from my build. |
Before doing |
Have a look @VladimirMikulic @jywarren |
Please post a gif showing this on a real device. Thank you. |
@VladimirMikulic how do i do that? |
You can use a screen recording app. |
I meant more of how i can get to visit the page on my phone |
You can use a service like |
Okay. Thank's! 👍 Will continue with this tomorrow. |
@VladimirMikulic please take a look. |
Also please, I'm not always able to view my changes on the plots2 mock server. It takes days for them to begin to reflect, i don't understand why that is so. Is there anything you know i can do about this?? |
@publiclab/reviewers Please review.☺ |
Your code could be refactored to promote reusability. |
@VladimirMikulic can you tell me where you think could be refactored? Or comment on my code better still. |
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.
Hopefully, now it's clear.
Now works for all situations. Please take a look, @VladimirMikulic |
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.
Please push the improvements.
Just to show you that JS is an unnecessary mess: Code: .ple-footer .footer-block {
display: inline;
}
@media (max-width: 600px) {
.ple-footer .footer-block {
display: flex;
justify-content: space-between;
align-items: center;
}
.ple-footer .footer-block #btn-history,
.ple-footer .footer-block .ple-publish {
padding: 0.5rem 1rem;
}
.ple-footer .footer-msg {
font-size: 1.2rem;
}
} <div class="footer-block">
<button id="btn-history" class="btn btn-lg btn-default btn-more">...</button>
<span class="footer-msg">
By publishing, you agree to
<a href="https://publiclab.org/licenses">open source your work</a>
<span class="hidden-xs"> so that others may use it.</span>
</span>
</div>
<div class="footer-block">
<button class="ple-publish btn btn-lg btn-primary pull-right disabled">
Publish
</button>
<span class="ple-help pull-right">
<span class="ple-steps-left">X</span>
<span class="hidden-xs"> steps left</span>
</span>
</div> |
Cool, |
In my opinion, this looks nicer because the user is able to read the whole message + we avoid javascript which will likely become a debugging problem in the future. That's why CSS exists. Let's see what others think. |
Okay.👍 |
Hi @VladimirMikulic , there hasn't been any comments from any other reviewer yet. If we can tell exactly how we want this to look. I can quickly make the changes. |
Never mind, we can wait a few more days. |
Hi all, my apologies for not writing in sooner. Gosh, you've gone through a lot of work here. I know it can be challenging to go through so many iterations and appreciate both of your patience and understanding in going through the process and finding a workflow that works for both of you.
@Shulammite-Aso i think this is a good instinct because we need to be aware of how the corresponding HTML is structured in downstream usages, like in this file: https://github.com/publiclab/plots2/blob/master/app/views/editor/rich.html.erb Any CSS or JS we add here must be able to operate on the HTML used downstream; the Thanks a lot, folks -- ❤️ |
Thank you for your input @jywarren so currently, we have two changes in this PR; hiding the footer when typing on small screens and optimizing the look of the footer on the same smaller screens. The one we're not yet sure of whether the implementation is desirable or not is that of changing the look of the footer. If a change in this area is not quite necessary, we can remove it, and only merge that of hiding the footer when typing. Or we can merge all our current changes (and maybe a few adjustments if needed) since it will mean no change to downstream html structure. here is what the footer looks like with using javascript to make the changes (sorry it's too zoommed out, i made the gif on a mobile phone) #464 (comment) cc @cesswairimu @VladimirMikulic @Shreyaa-s @keshav234156 @NitinBhasneria please do leave your suggestion. |
I guess my suggestion would be to use That way we could use corresponding breakpoints to hide footer on plots2 as well! What do you think? For Bootstrap 4 it's: https://getbootstrap.com/docs/4.4/utilities/display/ Bootstrap 3 is a bit simpler. Thank you!!! |
wondering if we still need to upgrade to bootstrap 4, so we know if we need to consider upgrading it now and using bootstrap 4 classes in fixing both this issue and this #526, where we need to. |
@jywarren i think we'll need focusin and focusout to hide the footer when typing, that's how JS may end up coming in here. unless maybe we want to hide the footer entirely on small screens. |
I can remove footer design optimization from this PR, and do it in another PR if we still need to. Thanks!!! |
Yes, i think we can do this! And, could we use both Bootstrap 3 and 4 classes to hide? That way we don't make a breaking change and remain compatible. Thank you! |
Oh. The footer here is the PUBLISH bar actually. I don't think we can hide it. Folks we need to be able to publish there posts. Sorry, I think i've not been descriptive enough with saying "hide ple-footer..." you may have thought i was referring to the main footer on publiclab website. |
And i happen to have made this new PR #579 the same time you dropped your comment. |
fixes #435
When typing on small screens the ple-footer disappears making more space for user to be able to see what they are typing.
Instead of this:
we'll have this:
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt jasmine
fixes #0000
-style reference to original issue #@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.
Thanks!