Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move the dropdown div to a namespace instead of a class with only static properties #5979

Merged
merged 5 commits into from
Mar 7, 2022

Conversation

BeksOmega
Copy link
Collaborator

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Maybe finishing #5860

Proposed Changes

Changes the dropdown div to be a namespace instead of a class that only has static properties. This includes changing the module-local variables to conform to the styleguide.

Should be no behavior changes, because I am reexporting the module under its previous name.

Reason for Changes

Workin' toward typescript.

Test Coverage

All unit tests pass.

Documentation

N/A

Additional Information

N/A

@BeksOmega BeksOmega requested a review from a team as a code owner March 4, 2022 00:08
@BeksOmega BeksOmega requested a review from gonfunko March 4, 2022 00:08
@@ -163,7 +160,8 @@ DropDownDiv.positionToField_ = null;
* height:number
* }}
*/
DropDownDiv.BoundsInfo;
let BoundsInfo;
exports.BoundsInfo = BoundsInfo;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpcallen does this work as expected, or does the type annotation need to be on the export? I'm not quite sure how that all interacts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how other type defs work I think. So hopefully should be good? If not I can go through and change those as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is fine. And it will soon be a single export let …, which is definitely fine as far as annotating it goes.

@@ -387,18 +372,17 @@ const showPositionedByRect = function(
*/
const show = function(
owner, rtl, primaryX, primaryY, secondaryX, secondaryY, opt_onHide) {
owner_ = owner;
onHide_ = opt_onHide || null;
owner = owner;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make this newOwner to avoid shadowing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Thought I caught all of these. I'll do another check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I think this was actually the last one!

@BeksOmega BeksOmega merged commit 543cb8e into google:develop Mar 7, 2022
@BeksOmega BeksOmega deleted the refact/dropdowndiv-es6 branch April 5, 2022 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants