Skip to content
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

HTML IDs are used multiple times #27870

Closed
individual-it opened this issue May 12, 2017 · 11 comments
Closed

HTML IDs are used multiple times #27870

individual-it opened this issue May 12, 2017 · 11 comments

Comments

@individual-it
Copy link
Member

Steps to reproduce

  1. look at the HTML of the files App
  2. search for items with the id "notification"

Expected behaviour

there should be only one item with that id

Actual behaviour

there is a div with the id "notification" inside "notification-container" div
and multiple in "app-content-*" divs

Server configuration

Operating system:
Debian
Web server:
Apache 2.2
Database:
sqlite
PHP version:
PHP 7.0.7-5
ownCloud version: (see ownCloud admin page)
10.0.0.12
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
git

The content of config/config.php:

{
    "system": {
        "instanceid": "oc150y5qiolb",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost"
        ],
        "datadirectory": "\/home\/artur\/www\/owncloud-core\/data",
        "overwrite.cli.url": "http:\/\/localhost\/owncloud-core",
        "dbtype": "sqlite3",
        "version": "10.0.0.12",
        "logtimezone": "UTC",
        "skeletondirectory": "\/tmp\/data",
        "installed": true
    }
}

List of activated apps:

Enabled:
  - comments: 0.3.0
  - dav: 0.2.9
  - federatedfilesharing: 0.3.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.0
  - files_sharing: 0.10.0
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - testing
  - theme-example

Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Firefox
Operating system:
Debian

@PVince81
Copy link
Contributor

yes and it sucks... very old dusty tech debt

@PVince81 PVince81 added this to the backlog milestone May 12, 2017
@PVince81
Copy link
Contributor

it's all over the place. Instead of touching everything the approach is to fix whatever is being touched as part of feature/bugfixes

@phil-davis
Copy link
Contributor

So I guess @individual-it should fix this one while writing the UI tests that need to find things on the page by id. And fix others as they are found when building PageObjects for each page.

@PVince81
Copy link
Contributor

Yes, that's a good idea. Make sure to grep all source code to make sure that changing those ids don't break anything. Some source code and CSS likely requires adjusting.

@individual-it
Copy link
Member Author

I don't think we need to change the IDs just delete the DIVs that come later
No JS should have used them as they are not "first" with that ID in the DOM.
what do you think of: f6e2de4
Or are there cases where these template files are used without layout.user.php ?

@individual-it
Copy link
Member Author

same problem on the files page with fileList id

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

@individual-it
Copy link
Member Author

I feel this is a real problem and we need to fix it to make oC generate correct HTML

@individual-it individual-it reopened this Dec 20, 2017
@PVince81
Copy link
Contributor

This would likely need a rewrite of all the frontend components.

Can only be done on a case by case basis when touching parts of the UI.

@individual-it
Copy link
Member Author

should I open case by case issues? If the UI works in practicality its "only" bad design and makes future development harder

@PVince81
Copy link
Contributor

@individual-it if you find issues that are impairing or breaking the UI tests, then we have a good reason to fix that if possible.

I know there are some ids that are really hard-coded in many places so might not be easy for some (ex: "#filestables", "#fileList")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants