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

Move the dropdown field into the dropdown div. #3122

Merged
merged 5 commits into from
Oct 3, 2019

Conversation

samelhusseini
Copy link
Contributor

@samelhusseini samelhusseini commented Sep 27, 2019

The basics

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

The details

Resolves

Last (dropdown) field still using the widget div.

Proposed Changes

Render the dropdown field in the dropdown div.
Add default colors to the dropdown div, so that each owner that doesn't care about setting the color doesn't need to set default colors. (We should think about how this ties into themes).
Added support for inverted text (white text with colored background), by default resorting to black text for the white default background.

Reason for Changes

Test Coverage

Tested playground.

Tested on:

  • Desktop Chrome

Documentation

Additional Information

Screen Shot 2019-09-27 at 2 02 55 PM


'.blocklyDropDownDiv .goog-menuitem-highlight,',
'.blocklyDropDownDiv .goog-menuitem-hover {',
'background-color: rgba(0,0,0,.2);',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't use goog-menuitem-hover

@@ -185,10 +201,16 @@ Blockly.DropDownDiv.clearContent = function() {
* Set the colour for the drop-down.
* @param {string} backgroundColour Any CSS colour for the background.
* @param {string} borderColour Any CSS colour for the border.
* @param {boolean=} opt_invertedText Whether or not the text color should be
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why opt_invertedText instead of opt_className?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was hoping to just provide the two options, and that was a way to indicate whether or not the color needs inverted text or not.
I will leave this out of this PR though, and think about it a little more.

@samelhusseini samelhusseini merged commit fba98fc into google:develop Oct 3, 2019
@samelhusseini samelhusseini deleted the field_dropdown_div branch October 3, 2019 21:35
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.

2 participants