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

Missing some sort of "confirmation" for 0 errors, empty summary #13

Closed
jdan opened this issue Jun 11, 2015 · 4 comments
Closed

Missing some sort of "confirmation" for 0 errors, empty summary #13

jdan opened this issue Jun 11, 2015 · 4 comments

Comments

@jdan
Copy link
Owner

jdan commented Jun 11, 2015

http://jordanscales.com/

image

"Headings" produces an empty summary. Clicking "Labels" does, well, nothing. Expected because there are no inputs, but maybe a little strange.

@ankitaggarwal011
Copy link

Agreed. A simple "Congratulations. All good!" message would suffice. Are you working on the change?

I read the project, I think a simple detection for 0 errors here: https://github.com/Khan/tota11y/blob/master/plugins/shared/info-panel/index.js#L197 would do the job.
@jdan

@ankitaggarwal011
Copy link

I tried to solve this. Does this look good in case of no error? What do you think? @jdan

noerror-message

@jdan
Copy link
Owner Author

jdan commented Jun 30, 2015

@ankitaggarwal011 Thanks for the mockup :) Design-wise it's pretty solid - i'd like the panel to be a little shorter though. Maybe ditch the panel all together for a small green box in the bottom right corner. Unfortunately it's a little confusing because the landmarks plugin will never report any errors.

I think we'll need a higher-level solution here where plugins can claim whether or not they'll be reporting errors. I'll likely end up working this into #20.

tota11y.addPlugin('my-plugin', {
    reportsErrors: true,
    run: function() {
        // ...
    },
    cleanup: function() {
        // ...
    }
});

@ankitaggarwal011
Copy link

@jdan , Thanks! I think keeping the panel uniform for all plugins would be better UX decision, else It would be confusing. Since, in the test case only the Landmarks plugin showed no errors, I used it to demonstrate the design. However, I have just added code in info-panels/index.js to catch the case where the errors are zero (it's not plugin specific). This will be in all the cases where the number of errors are zero.

I agree that ultimately you should move to the approach where developers can add plugin with a specific API which has the flexibility whether to show summary, errors, or some other tabs they would like.

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

2 participants