W3C HTML Project Archive

repository·master·Indexed 24 days ago

https://github.com/w3c/html

An archive of the W3C HTML project, containing documentation on building the HTML specification using Bikeshed and Node.js, guidelines for editing and merging pull requests, and the W3C Code of Ethics and Professional Conduct (CEPC).

Tokens
2.3K
Snippets
5
Records
12
Agent score
75%

What's inside w3c-html

  1. W3C Code of Ethics and Professional Conduct (CEPC) Overview

    master

    The W3C Code of Ethics and Professional Conduct (CEPC) defines accepted behaviors and promotes high standards of professional practice within the W3C community. It applies to all participants, including staff, members, invited experts, and anyone partaking in the W3C work environment (mailing lists, meetings, teleconferences, etc.).

    Key Principles:

    1. Treat others with respect, professionalism, fairness, and sensitivity.
    2. Prohibit harassment, bullying, and discrimination.
    3. Communicate constructively and avoid demeaning or insulting language.
    4. Provide and accept objective work criticism and acknowledge contributions.
    5. Maintain honesty regarding qualifications and conflicts of interest.
    6. Respect privacy and data confidentiality.
    7. Be culturally conservative in actions but liberal in acceptance, while rejecting unwelcome behavior.
    8. Promote these rules and intervene when inappropriate behaviors are observed, especially in leadership positions.
  2. Understand the automatic build process for HTML documentation

    master

    The HTML specification documentation is automatically rebuilt via Travis-CI whenever changes are made to the master branch of the HTML repository. The resulting files are then deployed to the gh-pages branch.

    Warning: Do not edit or commit changes directly to the gh-pages branch. Any manual changes made there will be overwritten during the next automatic rebuild.

  3. Merge Pull Requests from Branches

    master

    For pull requests originating from branches within the same repository, use the mypr bash function. Unlike fork-based PRs, pushing to the branch will automatically close the pull request and mark it as merged.

    1. Use the mypr function: mypr <branch_name>
    2. The function handles rebasing on master, force-pushing to the branch, and performing a fast-forward merge into master.
    3. git push will automatically close the PR.
  4. Merge Pull Requests from Forks

    master

    To maintain a single commit per change on the master branch, do not use the GitHub 'Merge pull request' button. Instead, follow these steps to merge a PR from a fork:

    1. Switch to the master branch: git checkout master
    2. Fetch and prepare the PR locally: pr <pull request ID> (requires the pr bash function).
    3. Squash commits: If the PR has multiple commits, squash them into a single commit (or a few distinct logical commits) using git rebase -i origin/master and the squash command.
    4. Update commit messages: If you need to add references (e.g., Fix #<bug ID>: ), use git rebase -i origin/master with reword or use git commit --amend.
    5. Push the changes: git push
    6. Close the PR in the web interface:
      • Navigate to the PR.
      • Add a comment: Merged as <commit_hash>.
      • Click "Close pull request".
    git checkout master
    pr <pull request ID>
    git rebase -i origin/master
    git push
  5. Install Bikeshed for building HTML documentation

    master

    The HTML specification is built using Bikeshed. For Windows 10 users, follow these steps to install it:

    1. Install Python 2.7.x (32bit version) in the default location. Ensure you select the option to install the system path environment variable.
    2. Open an elevated command prompt (Run as administrator).
    3. Update your system PATH by running: setx /m PATH "%PATH%;C:\Python27;C:\Python27\Scripts"
    4. Clone the Bikeshed repository: git clone https://github.com/tabatkins/bikeshed.git
    5. Install Bikeshed in editable mode using pip: python -m pip install --editable /path/to/cloned/bikeshed

    Note: If the path to the Bikeshed folder contains spaces, enclose the path in quotation marks.

    For other platforms, refer to the official Bikeshed documentation.

    setx /m PATH "%PATH%;C:\Python27;C:\Python27\Scripts"
    git clone https://github.com/tabatkins/bikeshed.git
    python -m pip install --editable /path/to/cloned/bikeshed
  6. Approving Pull Requests

    master

    Editors follow these guidelines when reviewing and approving changes:

    • Editorial Changes: Typo corrections or readability improvements generally do not require extensive review and can be committed directly by editors without a PR.
    • Substantive Normative Changes: Must be approved by two editors. If the contributor is an editor, one other editor can merge. If the contributor is external, two editors must indicate support before merging.
    • IPR Checks: If a normative change fails the IPR check (contributor not in the working group or unknown to the checker), do not merge. Contact the chairs to resolve.
    • Build Failures: If Travis-CI fails due to a Bikeshed error, the PR must be corrected before merging to avoid breaking the main spec build.
    • Controversial Changes: Use judgment; controversial changes often require wider working group review before merging.
  7. Build a single-page version of the HTML specification

    master

    To generate the single-page version of the specification using Bikeshed, follow these steps from the HTML repository folder:

    1. Update the specification source: bikeshed update
    2. Build the specification: bikeshed spec

    It is recommended to run these locally to verify that your changes build correctly before submitting a Pull Request.

    bikeshed update
    bikeshed spec
  8. Reporting inappropriate behavior in the W3C community

    master
    If you need to report inappropriate behavior, do not use the Positive Work Environment Task Force mailing list (public-pwe@w3.org). Instead, follow the official Procedures provided by W3C to ensure the report is handled correctly.
  9. Build a multi-page version of the HTML specification

    master

    Bikeshed produces a single-page version by default. To break this down into multiple pages, you must use a multi-page script which requires Node.js.

    1. Install the multi-page script

    1. Install Node.js.
    2. Clone the html-tools repository: https://github.com/w3c/html-tools.
    3. Navigate to the cloned folder and run: npm install

    2. Run the script

    Execute the script by passing the path of the single-page specification: node multipage.js [path of the spec]

    npm install
    node multipage.js [path of the spec]
  10. Update cached Bikeshed spec-data

    master

    The specification build uses a cached version of the Bikeshed spec-data to prevent real-time data changes from breaking the build. If you need to update the cached data to the latest version:

    1. Run bikeshed update locally.
    2. Copy the resulting spec-data files into the .spec-data folder within the master branch of the repository.
  11. Bash functions for PR management

    master

    The following helper functions are used by editors to manage pull requests via the command line. They ensure that PRs are rebased on master and merged using fast-forward only to maintain a clean history.

    pr <pull_request_id>: Pulls a PR from a fork using GitHub's special refs, rebases it on master, and performs a fast-forward merge into master.

    mypr <branch_name>: Rebases an internal branch on top of master, force-pushes to update the PR, and performs a fast-forward merge into master.

    pr () {
      git fetch origin refs/pull/$1/head:refs/remotes/origin/pr/$1 --force
      git checkout -b pr/$1 origin/pr/$1
      git rebase master
      git checkout master
      git merge pr/$1 --ff-only
    }
    
    mypr () {
      git checkout $1
      git rebase master
      git push origin $1 --force
      git checkout master
      git merge $1 --ff-only
    }
  12. Glossary of W3C Conduct Terms

    master

    The following terms define the standards of the CEPC:

    • Demeaning behavior: Acting in a way that reduces another person's dignity, sense of self-worth, or respect.
    • Discrimination: Prejudicial treatment based on personal characteristics (e.g., race, gender, religion, disability, age, etc.).
    • Insulting behavior: Treating another person with scorn or disrespect.
    • Acknowledgement: A record of the origin(s) and author(s) of a contribution.
    • Harassment: Conduct (verbal or physical) intended or effective in interfering with an individual or creating an intimidating, hostile, or offensive environment.
    • Leadership position: Includes group Team contacts, group Chairs, W3C management, and Advisory Board members.
    • Participant: Includes W3C Team (employees, contractors, fellows), group participants (members/experts), Advisory Committee Representatives, W3C Offices staff, and the Public.
    • Respect: Genuine consideration for others shown through polite and kind treatment.
    • Sexual harassment: Includes visual displays of degrading sexual images, suggestive conduct, offensive remarks, requests for sexual favors, unwelcome physical contact, and sexual assault.
    • Unwelcome behavior: Behavior that might offend, hurt, or be misinterpreted as harmful. If unsure if behavior is welcome, do not do it.
    • Unwelcome sexual advance: Requests for sexual favors or conduct where submission/rejection is tied to employment or interferes with work performance.
    • Workplace Bullying: Persistent aggressive or unreasonable behavior (verbal/written abuse, interference) against a co-worker.
    • Work Environment: All means of collaboration, including mailing lists, private correspondence, web pages, chat channels, teleconferences, and face-to-face meetings.