View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019508 | mantisbt | javascript | public | 2015-03-16 15:23 | 2015-12-06 02:45 |
Reporter | atrol | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.0-beta.2 | ||||
Target Version | 1.3.0-rc.1 | Fixed in Version | 1.3.0-rc.1 | ||
Summary | 0019508: Regression when using MantisBT in a browser where JavaScript is disabled | ||||
Description | Version 1.2.x of MantisBT allowed users to use a browser where JavaScript is disabled with just a few functional limitations. Disabling JavaScript in 1.3.x leads to various side effects, e.g. duplicated sections where collapse functionality is used. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
This is due to the fact that the collapse/expand is handled through jQuery (common.js). There are several other features in 1.3 which rely on javascript, e.g. captcha refresh, filter highlighting, etc. I think we should require javascript in 1.3. |
|
the collapse_api seems to be a not so good implementation |
|
Another side effect, which affects the normal js-enabled case: |
|
please try this css fix: |
|
nice catch... probably deserves its own separate issue, as it would not be so trivial to fix (and is definitely not addressed by your CSS tweak)
Not sure I'm following you here, can you please clarify ? |
|
I wonder whether instead of fixing this, we should make a change that will hide the MantisBT interface and show a message that Javascript must be enable for MantisBT to work. |
|
Imho, not for the reason of this bug. I mean: any UI improvement has been delayed to a future next major release, so let that decision be justified with an actual UI improvement. So, being consistent, since 1.3 will not have major javascript intensive functionality, its worth polishing this kind of bugs, to keep the ui "as is" for the next release cycle. More to this, i think this is a regression of the CSS changes, 1.2 has the same messed collapse_api but somehow the visibility is set right on page load.
inner.hide() / inner.show() |
|
While having a single inner div with contents as you suggest would probably be fine in most cases, it would only work for "basic" collapsed sections, i.e. those which only contain the "-" button and the section's title. How would you suggest we handle special cases, e.g. the sponsorship section (the title changes when it's collapsed to show the total amount) or the filters div ? |
|
You can't do much on the internet these days without javascript. Lets not get stuck in last decade world. We have already made the decision that in 1.3 javascript is not optional. Let's just advertise this when the browser doesn't have it enabled. This will enable all plugins and core to just know that this is the case and develop accordingly without "it is just this thing that is broken". |
|
As mentioned in the PR https://github.com/mantisbt/mantisbt/pull/664, the proposed fix basically disables access to the expanded filter box when js is disabled, so it is not a good solution to the problem.
While I don't disagree with this, I don't recall a formal decision. |
|
|
|
cproensa, I opened 0020224 to track the collapse API issues, let's continue this discussion there, and keep this issue focused on fixing the duplicated sections (even if it's just a temporary workaround) With regards to the JS detection, we have to think of a proper way to do this from PHP. |
|
this is a neat trick: hiding stuff with jquery startup may cause some flickerig. Remember the attempt to move scripts to footer made it even worse. However, JS detection should not be needed from server. If it is needed, maybe the design is wrong? |
|
Please keep in mind: There are a large number of corporate users who object to a reliance on javascript for proper operation. It interferes with security settings and other add-ons like screen readers for the blind. |
|
MantisBT: master 9674df6c 2015-10-23 08:45 Committer: dregad Details Diff |
CSS: Hide collapsed sections when JS is disabled What is wrong with the collapse_api semantics: JS writes the collapse state in a cookie; the server retrieves it to display each section in the proper state. The classes 'collapse_closed' and 'collapse_open' may be reversed, causing a collapsed section to have class 'collapse_open'... wtf? This commit fixes the problem by creating a new class to identify which section is the collapsed one. This new class is not affected by javascript, and hidden by default using CSS. Fixes 0019508 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes from cproensa's original commits: - squashed - commit message reworded - CSS rule on a single line |
Affected Issues 0019508 |
|
mod - core/collapse_api.php | Diff File | ||
mod - css/default.css | Diff File |