-
Notifications
You must be signed in to change notification settings - Fork 56
Comparing changes
Open a pull request
base repository: github/markdown-toolbar-element
base: v2.1.0
head repository: github/markdown-toolbar-element
compare: v2.1.1
- 16 commits
- 9 files changed
- 2 contributors
Commits on Jan 4, 2022
-
Since we are only updating developer dependencies, we can gain enough confidence in this change by making sure the test task exists cleanly.
Configuration menu - View commit details
-
Copy full SHA for dd80511 - Browse repository at this point
Copy the full SHA dd80511View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1831a19 - Browse repository at this point
Copy the full SHA 1831a19View commit details -
Merge pull request #54 from github/update-dependencies
Update developer dependencies
Configuration menu - View commit details
-
Copy full SHA for 314ae02 - Browse repository at this point
Copy the full SHA 314ae02View commit details -
The test shows that changes to the `level` attribute of a markdown header button aren't reflected in the output when pressing the button.
Configuration menu - View commit details
-
Copy full SHA for 2fe2941 - Browse repository at this point
Copy the full SHA 2fe2941View commit details -
Convert
constructor
to aconnectedCallback
functionBuilding 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.
Configuration menu - View commit details
-
Copy full SHA for a414178 - Browse repository at this point
Copy the full SHA a414178View commit details -
`constructor` will call the `super` function automatically. We don't have to allocate code to do that as well.
Configuration menu - View commit details
-
Copy full SHA for 8c211d4 - Browse repository at this point
Copy the full SHA 8c211d4View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for b395a41 - Browse repository at this point
Copy the full SHA b395a41View commit details -
Add a
attributeChangedCallback
to header buttonEven 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.
Configuration menu - View commit details
-
Copy full SHA for 7e3d22c - Browse repository at this point
Copy the full SHA 7e3d22cView commit details
Commits on Jan 5, 2022
-
Merge pull request #55 from github/use-connectedcallback
Use the connectedCallback function to set button styles instead of the constructor
Configuration menu - View commit details
-
Copy full SHA for a068e8f - Browse repository at this point
Copy the full SHA a068e8fView commit details
Commits on Feb 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f8a6d2c - Browse repository at this point
Copy the full SHA f8a6d2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 995a3d6 - Browse repository at this point
Copy the full SHA 995a3d6View commit details
Commits on Feb 17, 2022
-
Merge pull request #61 from github/theinterned/install-chromium
Use chromium for karma tests
Configuration menu - View commit details
-
Copy full SHA for f39ff9e - Browse repository at this point
Copy the full SHA f39ff9eView commit details
Commits on Feb 28, 2022
-
Co-authored-by: Ned Schwartz <ned@theinterned.net>
Configuration menu - View commit details
-
Copy full SHA for 603c883 - Browse repository at this point
Copy the full SHA 603c883View commit details
Commits on Mar 1, 2022
-
Merge pull request #62 from github/node-16-in-codespaces
Add a .devcontainer
Configuration menu - View commit details
-
Copy full SHA for 7e6dba7 - Browse repository at this point
Copy the full SHA 7e6dba7View commit details
Commits on Mar 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 65a4899 - Browse repository at this point
Copy the full SHA 65a4899View commit details -
Merge pull request #63 from github/add-release-action
Add a release action
Configuration menu - View commit details
-
Copy full SHA for e48fbc5 - Browse repository at this point
Copy the full SHA e48fbc5View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v2.1.0...v2.1.1