Opened 7 years ago

Closed 5 years ago

#16647 closed defect (wontfix)

[patch][cla] dojox.mobile.ProgressIndicator is not vertically centered

Reported by: dg Owned by: Patrick Ruzand
Priority: low Milestone: tbd
Component: DojoX Mobile Version: 1.8.3
Keywords: Cc: Sebastien Pereira
Blocked By: Blocking:

Description

In dojox/mobile/themes/common/ProgressIndicator.less

.mblProgressIndicatorCenter {

position: absolute; top: 180px; left: 50%;

}

A naive fix would be to have top:50% and also fix:

.mblProgressIndicatorCenter .mblProgContainer {

left: -50%; top: -50%;

}

Unfortunately, I cannot test on lots of devices if it brakes something..

Change History (7)

comment:1 Changed 6 years ago by Patrick Ruzand

Owner: changed from Eric Durocher to Patrick Ruzand
Status: newassigned

comment:2 Changed 6 years ago by Patrick Ruzand

Milestone: tbd1.10
Priority: undecidedlow

comment:3 Changed 6 years ago by Sebastien Pereira

Cc: Sebastien Pereira added

comment:4 Changed 6 years ago by Sebastien Pereira

I don't see any side effect related to a particular device/os (tested on android/ios/BB and WP). However I found a potential side effect due to the usage of the ProgressIndicator? with the current CSS. It is illustrated by this test/example: https://github.com/dojo/dojox/blob/master/mobile/tests/test_ProgressIndicator.html

The ProgressIndicator? is attached to the view (container, line 31), which height is 0 (until it is loaded). So the top:180px makes the Progressindicator "far" from the top...

If we replace top:180px by a percentage the PI will stick to the top, unless the application (in that specific case) attaches the PI to the body, which I think, is a better way to do.

container.appendChild(prog.domNode);
//would have to be:
win.body().appendChild(prog.domNode);
// with "win" a require of "dojo/_base/window"

Also, the propose solution can be improved/simplified like this:

.mblProgressIndicatorCenter {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top:0;
	margin: auto;
}

.mblProgressIndicatorCenter .mblProgContainer {
}

I'll propose a PR with these changes.

Last edited 6 years ago by Sebastien Pereira (previous) (diff)

comment:6 Changed 5 years ago by dylan

Summary: dojox.mobile.ProgressIndicator is not vertically centered[patch][cla] dojox.mobile.ProgressIndicator is not vertically centered

comment:7 Changed 5 years ago by Patrick Ruzand

Milestone: 1.10tbd
Resolution: wontfix
Status: assignedclosed

Since this patch may have some side effects on existing app, I'm closing the ticket as wont fix. Users may still apply the patch if the limitation (see comment 4 above) fits their use case.

Note: See TracTickets for help on using tickets.