Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/markdown-toolbar-element
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: github/markdown-toolbar-element
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.1
Choose a head ref
  • 16 commits
  • 9 files changed
  • 2 contributors

Commits on Jan 4, 2022

  1. Update developer dependencies

    Since we are only updating developer dependencies, we can gain enough
    confidence in this change by making sure the test task exists cleanly.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    dd80511 View commit details
    Browse the repository at this point in the history
  2. Ignore ESLint rules in test file

    We don't need to be as strict in our tests files as we are in production
    code. Test code can contain English as well as some `innerHTML`
    shenanigans.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    1831a19 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #54 from github/update-dependencies

    Update developer dependencies
    koddsson authored Jan 4, 2022
    Configuration menu
    Copy the full SHA
    314ae02 View commit details
    Browse the repository at this point in the history
  4. Create failing test

    The test shows that changes to the `level` attribute of a markdown
    header button aren't reflected in the output when pressing the button.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    2fe2941 View commit details
    Browse the repository at this point in the history
  5. Convert constructor to a connectedCallback function

    Building a header button in memory with a custom heading ("level")
    causes a unexpected behaviour. Consider the following example:
    
    ```js
    const headerButton = document.createElement('md-header') // The constructor is executed at this point.
    headerButton.setAttribute('level', '1')                  // Has no effect since the style has already been set.
    headerButton.textContent = 'h1'
    document.body.appendChild(headerButton)
    ```
    
    While we expect to have a header button that outputs a single hash
    (`#`), we have a button that outputs three (`###`). The constructor sets
    the styles based on the `level` attribute when the component is
    initialised.
    
    Changing the constructor to a `connectedCallback` function
    ensures that the button styles aren't set until the button is connected
    to the DOM.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    a414178 View commit details
    Browse the repository at this point in the history
  6. Remove useless constructor

    `constructor` will call the `super` function automatically. We don't
    have to allocate code to do that as well.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    8c211d4 View commit details
    Browse the repository at this point in the history
  7. Change constructors to connectedCallbacks

    Since `constructor` can be error-prone for custom elements and keep all
    the components similar, I've also changed all the constructors to
    `connectedCallback` functions.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    b395a41 View commit details
    Browse the repository at this point in the history
  8. Add a attributeChangedCallback to header button

    Even though we don't expect header buttons to change levels dynamically
    during an application lifetime, we should ensure that it works as
    expected.
    
    So I've added an `attributeChangedCallback` to the header
    button element. The callback changes the level style based on the
    `level` attribute.
    koddsson committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    7e3d22c View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Merge pull request #55 from github/use-connectedcallback

    Use the connectedCallback function to set button styles instead of the constructor
    koddsson authored Jan 5, 2022
    Configuration menu
    Copy the full SHA
    a068e8f View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2022

  1. add chromium

    theinterned authored Feb 16, 2022
    Configuration menu
    Copy the full SHA
    f8a6d2c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    995a3d6 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2022

  1. Merge pull request #61 from github/theinterned/install-chromium

    Use chromium for karma tests
    theinterned authored Feb 17, 2022
    Configuration menu
    Copy the full SHA
    f39ff9e View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2022

  1. Add a .devcontainer

    Co-authored-by: Ned Schwartz <ned@theinterned.net>
    koddsson and theinterned committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    603c883 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2022

  1. Merge pull request #62 from github/node-16-in-codespaces

    Add a .devcontainer
    theinterned authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    7e6dba7 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2022

  1. Configuration menu
    Copy the full SHA
    65a4899 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #63 from github/add-release-action

    Add a release action
    koddsson authored Mar 25, 2022
    Configuration menu
    Copy the full SHA
    e48fbc5 View commit details
    Browse the repository at this point in the history
Loading