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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add note about how to remove a previously set aspect ratio #13293

Merged
merged 1 commit into from Jun 19, 2018

Conversation

Projects
None yet
3 participants
@dannyrb
Contributor

dannyrb commented Jun 19, 2018

Checklist
  • relevant documentation is changed or added
  • commit messages or PR title follow semantic commit guidelines

Note

Hello! First time PR on this repository 馃憢
I tried to follow the guide that is laid out here but it's a bit intimidating. Any/all guidance in how to improve this PR and/or future PRs would be appreciated 馃憤

About this PR

I was hanging out in Atom's Slack's #Electron channel and someone asked how to "unset" an aspect ratio that was set with win.setAspectRatio(). The docs didn't have a clear answer, but I found this test in the spec:

describe('BrowserWindow.setAspectRatio(ratio)', () => {
it('resets the behaviour when passing in 0', (done) => {
const size = [300, 400]
w.setAspectRatio(1 / 2)
w.setAspectRatio(0)
w.once('resize', () => {
assertBoundsEqual(w.getSize(), size)
done()
})
w.setSize(size[0], size[1])
})
})

I've added a brief note to the existing documentation for the win.setAspectRatio() function that notes functionality can be reset by passing 0 to the function.

@dannyrb dannyrb requested a review from electron/docs as a code owner Jun 19, 2018

@welcome

This comment has been minimized.

Show comment
Hide comment
@welcome

welcome bot Jun 19, 2018

馃挅 Thanks for opening this pull request! 馃挅

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix, OR prefix at least one of your commit messages.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

welcome bot commented Jun 19, 2018

馃挅 Thanks for opening this pull request! 馃挅

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix, OR prefix at least one of your commit messages.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@zeke

zeke approved these changes Jun 19, 2018

@ckerr ckerr merged commit dd6c776 into electron:master Jun 19, 2018

8 of 9 checks passed

ci/circleci: electron-linux-arm Your tests failed on CircleCI
Details
WIP ready for review
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-mas-x64 Your tests passed on CircleCI!
Details
ci/circleci: electron-osx-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@welcome

This comment has been minimized.

Show comment
Hide comment
@welcome

welcome bot Jun 19, 2018

Congrats on merging your first pull request! 馃帀馃帀馃帀

welcome bot commented Jun 19, 2018

Congrats on merging your first pull request! 馃帀馃帀馃帀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment