Hide sidebar fully in ant design - antd

Is there anyway to hide ant design sidebar fully on onCollapse method?
One way is to set it's display to none, But I don't want that coz I want the same animation that onCollapse method provides by default.

As mentioned in the "Responsive" example you can set <Layout.Sider collapsedWidth={0} />, which will completely hide it.
By default this causes a trigger button with a hamburger icon to appear, but you can turn it off by adding trigger={null}.

Antd uses breakpoints similar to bootstrap, their idea is Mobile first, which means, you should think in mobile first.
It means, you should not design your web app for desktop and then try to hide/adjust when it's in smaller view.
Instead, you should, design it for mobile view and then adjust to desktop view.
ultimately, what I want to say is, set the sidebar default state as display:none and then use grid break points such as <Col md={2} />
you can see this question for more details antd hide on smaller view

Related

Eclipse-like layout on Vaadin

I'm looking to design a page with separate sections on Vaadin7.
Earlier, i was convinced that each section as a Panel would do-- see Vaadin menu design - which component at the top? on this.
Now, i need each of these sections be minimized/maximized at user's will. So - when the user clicks the minimize icon, that section will disappear (be minimized) until its maximize button is pressed.
The overall design will be much like Eclipse.
What's the best design for this?
I can use Vaadin Window-s for minimize/maximize. but then, how do i manage their automatic placement in the overall layout?
I want the sections be resizable with respect to one another, just as in Panel-s.
If i use HorizantalSplitPanel/VerticalSplitPanel-s, how do i manage minimize/maximize?
One thing i can think of is:
split the overall layout into Panel-s so that each section will be a
Panel,
put a Window in each panel,
when minimize is pressed, make
that window-minimize event also trigger to minimize the Panel that
Window is in shrink as well.
How to achieve this? Is there a better way?
TIA.

Customize Scrolling for Onsen Page (Pull to refresh)

I have a ons-page element that I want to customize the scrolling for. There are a few things I'd like to achieve, but mostly I want to understand what's going on.
By default, the page has -webkit-overflow-scrolling: touch. This is undesirable for two reasons:
The area "behind" the page shown during overflow is just plain white
I have no hooks to take action on over scroll. I'd like to add pull to refresh mechanics.
I've tried working with iScroll, but the behavior I'm seeing is that if I declare my scrollable element to be inside of the page, it calculates the full element height as the visible height. If I declare my scrollable element to be the page, I can move the page around, but not the content within the page.
I'm guessing some of this is related to "using native scrolling where it can", but I don't really understand how that's implemented, so I'm not really sure.
Any ideas?
Onsen UI doesn't support pull-to refresh as default.
How about using this library?
https://github.com/mgcrea/angular-pull-to-refresh
This is a library for angularJS.
P.S
Now Onsen UI support pull-to-refresh. http://onsen.io/reference/ons-pull-hook.html

navigate between two listview with slide motion in jQuery mobile

is it possible to navigate between two listview or even two view which has its own listview inside with slide motion in jQuery mobile, now as i implement the first sample when i click on a listview it does not have any motion, it just refresh and the other view come to browser. my purpose is to navigate between two view as like as native ios application which second view slide into first view from right to left.
is this possible with jQuery mobile?
thanks
solution without changing pages
if you don't want to change your page, a possible solution would be to wrap each listview in a swipable <div />.
There are some plugins out there like:
http://www.netcu.de/jquery-touchwipe-iphone-ipad-library
http://www.idangero.us/sliders/
solution with changing pages
If you're looking for standard page-transitions, take a look #
http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html
data-transition="slide" like #Omar said would fit your requirements.
try this
<li data-transition="slide"></li>

Further customise a jQueryMobile custom select menu

Does anyone one know of a workaround/hack ;¬) to further customise jQuery custom select menu - i.e. when we've used
$(document).bind('mobileinit',function(){
$.mobile.selectmenu.prototype.options.nativeMenu = false;
});
to give us a nice list-item overlay in place of the standard listview page on selecting from a select menu.
The jQM docs here http://jquerymobile.com/demos/1.2.1/docs/forms/selects/custom.html - state:
When it has too many options to show on the device's screen, the
framework will automatically create a new "page" populated with a
standard listview for the options. This allows us to use the native
scrolling included on the device for moving through a long list.
I would like to prevent this and always show the custom overlay; obviously the problem is scrolling the options which are out of view. When my project is switched to landscape thus decreasing the screen height it swithces to the 'old school', clunky listview. I should imagine its down to 'absolute' screen metrics since i can see the custom menu overlay will (just about) fit without reverting to the standard view.
The custom view is a much nicer looking interface, and more intuitive from a UI/UX perspective also.
Anyone know of any tricks to keep this behavior??

Windows Phone Application Bar TextBox

I was wondering, if it is somehow possible to add a TextBox in the Application Bar area (the same way the Internet Explorer does), but I didn't find any information source about this. Have you any idea, how to accomplish this task?
You will not be able to add UIElements inside ApplicationBar as it is not derived from UIElement.
Alternatively, you can try adding a Grid at the bottom of the screen and color it similar to the ApplicationBar. Then add a TextBlock inside the Grid. This is just a workaround and not recommended as it is not according to the standards.
You can also check the following link:
http://www.maxpaulousky.com/blog/archive/2011/01/10/bindable-application-bar-extensions-for-windows-phone-7.aspx

Resources