Git Product home page Git Product logo

doc-linter-webextension's Introduction

doc-linter-webextension

Greenkeeper badge Build Status

This WebExtension is used to lint MDN Documents. The rules used by the extension to lint the documents are available as part of a separate package (https://github.com/mdn/doc-linter-rules)

Extension sidebar caption

Compatibility

This WebExtension is compatible with:

  • Firefox 54+

This WebExtension is not compatible at all with:

  • Opera 46
  • Google Chrome (Sidebar API is not implemented)
  • Microsoft Edge (Sidebar API is not implemented)
  • Safari

Contributing

We are happy to accept contributions to the WebExtension. If you have any questions, we will be glad to answer them on irc.mozilla.org #mdn. See also the Contribution guidelines.

doc-linter-webextension's People

Contributors

elchi3 avatar greenkeeper[bot] avatar matonanthony avatar mozilla-github-standards avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doc-linter-webextension's Issues

Sidebar is not automatically opening when I edit a MDN page

Current behavior: The sidebar is not opening itself when I edit a MDN page.

Expected behavior:

  • On Firefox / Opera : The sidebar should open itself when editing a MDN page.
  • On Chrome / Edge / Safari : Sidebar API is currently unimplemented in those browsers and isn't planned on any of there roadmaps.

Blockers:
It isn't currently possible to open a sidebar programmatically (see: https://bugzilla.mozilla.org/show_bug.cgi?id=1341126)

References:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/sidebarAction

Add count link to avoid duplicates URL

Current behavior:
There is no test regarding potential link duplicates.

Expected behavior:
There should be a test to provide informations regarding duplicates links for SEO purposes.

Plan to action:
This is only a suggested plan to action

  1. Add a test getting the number of links for a same URL in an article.
  2. Define thresholds to return INFO, ERRORS or WARNINGS depending of the amount of link.
  3. Implement the feature.

Actions pending:

  • Wait for the new Rule to be implemented in mdn/doc-linter-rules
  • Implement the use of the new package of rules

Add proper README and other github stuff

Current behavior:
Description, tags and README are empty.

Expected behavior:

  • Description should briefly introduce the extension
  • Tags should be filled with relevant tags for search purposes
  • README should introduce the project and contributing process / usage process

Actions pending:

  • Write a description
  • Write tags
  • Write a README

Add a pageAction button to trigger the sidebar

Triggering the sidebar with a pageAction button would allow users to hide it when they are not using it and be able to trigger it quickly.

Current behavior: None

Expected behavior:

  • On Firefox / Opera : this should open the sidebar if it's closed and close it if it's open
  • On Chrome / Edge / Safari : Sidebar API is currently unimplemented in those browsers and isn't planned on any of there roadmaps.

Blockers:
It isn't currently possible to open a sidebar programmatically (see: https://bugzilla.mozilla.org/show_bug.cgi?id=1341126)

References:
pageAction MDN Documentation : https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/pageAction

Keyboard shortcuts

We are looking into adding a shortcut to open and close the sidebar directly on our panel.

So we are looking for ideas for shortcuts, if you have some.

Encourage writers to open the linter when editing MDN

Could the add-on be enhanced so that when the user is in MDN's editor, it adds a little blurb or box or something somewhere to remind the user to open the sidebar and run the linter? Perhaps add an "open linter sidebar" button next to the Save buttons on the page (and ideally to the CKEditor toolbar, if that's possible without a CKEditor plugin -- if one is required I might be able to help with that).

If an "open linter" button can't be done, at least a text reminder to use the linter would be helpful -- I keep forgetting to do it! :)

Run test suite also in source view

Original issue: Elchi3/mdn-doc-tests#84.

Currently the test suite is just run while editing an article within the formatted view. Though the results should also be displayed while you're within the source view.

To allow the tests to work the same once issue #80 got implemented, the source needs to be turned into HTML.

Sebastian

Highlight matches within the page

Original issue: Elchi3/mdn-doc-tests#49

It should be possible to somehow highlight the part of the page related to an error.

E.g. this could happen when hovering the match or by clicking an icon next to it. The matched part should then be scrolled to and highlighted like Firebug's or the DevTools' inspector does it.

Sebastian

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

Localization label issues

Two labels aren't working properly at the moment:

  • article_length_info when you expand "Article length"
  • count_link_info when you expand "Link count"

Also, the labels for the mixed content test seem to be missing.

Define a release process

Current behavior:

  1. Releases are done manually and are not signed thus requiring to edit about:config to load them on Firefox.
  2. At each update people are forced to reinstall the extension as there is currently no update mechanism.

Expected behavior:

  1. Releases should be signed by addons.mozilla.org so we should no longer have to flip the switch in about:config.
  2. It would be great to be able to update the extension.

Potential solutions:

  1. We can sign the extension on addons.mozilla.org.
  2. We could either put the extension on AMO and use the pre-release channel to release the extension to beta-tester and a stable release to normal users or we could self manage the updates until we get to a first stable version.

References:
Sign an extension : https://developer.mozilla.org/en-US/Add-ons/Distribution#Signing_your_add-on
Beta Version on AMO : https://developer.mozilla.org/en-US/Add-ons/Distribution#Beta_versions
Update process for extensions : https://developer.mozilla.org/en-US/Add-ons/Updates

Sort error list by importance

Current behavior:
The sidebar display the test results in the order they come regardless of the results

Expected behavior:
The sidebar could display the test results in four differents lists:

  • Errors
  • Warnings
  • Info
  • Ok

References:
Current sidebar (without the messages, working on it ^^)
image

The tests are not running anymore after the sidebar has closed

Current behavior:
Once the sidebar has been closed once, the tests are not running when the sidebar is reopened.

Expected behavior:
The test should be able to run whenever the sidebar has been opened independently of any previous state.

Step to reproduce:

  1. Open an MDN page in edit mode
  2. Launch the test suite
  3. Close the sidebar
  4. Reopen the sidebar
  5. Relaunch the test suite

Debug information:

TypeError: this.port is undefined panel.js:49:3

is triggered by this action.

I think this is triggerred because the connection is initialized by the content_script when it's loaded.

const port = browser.runtime.connect(browser.runtime.id);

And so when I close the sidebar, the sidebar is unloaded and when I reopen it he doesn't have a connection anymore since the content_script isn't reloaded.

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Auto-run of rule checking fails after being in source mode

  1. Open the sidebar with the doc linter
  2. Edit an MDN doc
  3. Make changes and see doc linter panel updated automatically.
  4. Go into CKEditor "source" mode.
  5. Go back to WYSIWYG mode in CKEditor.
  6. Doc Linter sidebar no longer updates automatically.

Rerun tests when changing tabs

This is both a feature request and a "bug" regarding the previous version of the addon.
I use to open X tabs for each page I need to review/update and then switch from page to page. However, I need to refresh the page and click the button for the tests to be executed again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.