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: sliders mouseup is not firing when leaving the window #5184

Merged
merged 147 commits into from
Sep 29, 2021

Conversation

robarbms
Copy link
Contributor

Pull Request

πŸ“– Description

When leaving the window, the slider will not register a mouseup event.

🎫 Issues

#4825

πŸ‘©β€πŸ’» Reviewer Notes

I'm capturing mouseleave on the window document. I found that mouseout fired while still in the window. Perhaps it's firing for the shadow DOMs mouseout? The window element wouldn't fire on mouseleave so I'm using window.document. I attach it on mousedown and remove it on mouseup per the existing pattern.

πŸ“‘ Test Plan

βœ… Checklist

General

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

⏭ Next Steps

@scomea
Copy link
Collaborator

scomea commented Sep 14, 2021

are the horizonal scroll changes related to the slider issue?

@robarbms robarbms self-assigned this Sep 14, 2021
Rob Barber and others added 7 commits September 15, 2021 07:56
# Pull Request

## πŸ“– Description
Adding the file component to creator as a StandardControlPlugin for the "src" attribute. This replaces the image src text box in the right side form with a File component button configured to allow image file types (.jpg, .png, .gif). Clicking the button will open a file picker and when an image is selected it is converted to an ObjectUrl which is used for the image src.

*Note: Images added in this way are stored only on the client and only last for the session. No data about the file is transmitted or available outside of the client nor does it utilize cookies in any way.

<!---
Provide some background and a description of your work.
What problem does this change solve?
Is this a breaking change, chore, fix, feature, etc?
-->

### 🎫 Issues

<!---
* List and link relevant issues here.
-->

## πŸ‘©β€πŸ’» Reviewer Notes

<!---
Provide some notes for reviewers to help them provide targeted feedback and testing.

Do you recommend a smoke test for this PR? What steps should be followed?
Are there particular areas of the code the reviewer should focus on?
-->

## πŸ“‘ Test Plan

<!---
Please provide a summary of the tests affected by this work and any unique strategies employed in testing the features/fixes.
-->

## βœ… Checklist

### General

<!--- Review the list and put an x in the boxes that apply. -->

- [ ] I have included a change request file using `$ yarn change`
- [ ] I have added tests for my changes.
- [x] I have tested my changes.
- [ ] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/Microsoft/fast/blob/master/CONTRIBUTING.md) documentation and followed the [standards](https://www.fast.design/docs/community/code-of-conduct/#our-standards) for this project.

### Component-specific

<!--- Review the list and put an x in the boxes that apply. -->
<!--- Remove this section if not applicable. -->

- [ ] I have added a new component
- [ ] I have modified an existing component
- [ ] I have updated the [definition file](https://github.com/Microsoft/fast/blob/master/packages/web-components/fast-components/CONTRIBUTING.md#definition)
- [ ] I have updated the [configuration file](https://github.com/Microsoft/fast/blob/master/packages/web-components/fast-components/CONTRIBUTING.md#configuration)

## ⏭ Next Steps

<!---
If there is relevant follow-up work to this PR, please list any existing issues or provide brief descriptions of what you would like to do next.
-->
…ssing values are not hidden or missed (#5030)

* remove css color assignment from body of storybook to ensure there missing values are not hidden or missed

* Change files
* chore: eslint fixes in fast-components

* Change files

Co-authored-by: Chris Holt <chhol@microsoft.com>
Copy link
Contributor

@nicholasrice nicholasrice left a comment

Choose a reason for hiding this comment

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

I think something got messed up with the commit history on this PR. can you fix that before merging?

@robarbms
Copy link
Contributor Author

are the horizonal scroll changes related to the slider issue?

Another PR got merged some how. I've undone the errant changes

@robarbms
Copy link
Contributor Author

I think something got messed up with the commit history on this PR. can you fix that before merging?

Fixed this. I've removed the horizontal-scroll changes that some how got merged into this PR.

@nicholasrice nicholasrice self-requested a review September 17, 2021 21:46
@chrisdholt
Copy link
Member

@robarbms FYI - looks like there are a couple of conflicts with the Horizontal Scroll changes going in.

@robarbms
Copy link
Contributor Author

@robarbms FYI - looks like there are a couple of conflicts with the Horizontal Scroll changes going in.

There was a whitespace conflict πŸ˜‘

@robarbms robarbms requested a review from scomea September 24, 2021 18:33
@nicholasrice
Copy link
Contributor

It looks like git history got messed up on this, would you mind resolving prior to merge?

this.value = `${this.calculateNewValue(controlValue)}`;
/**
*
* @param e - MouseEvent or null. If there is no event handler it will remove the events
Copy link
Contributor

@nicholasrice nicholasrice Sep 28, 2021

Choose a reason for hiding this comment

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

Suggested change
* @param e - MouseEvent or null. If there is no event handler it will remove the events
* @param e - MouseEvent or null. If null is provided, events handlers will be removed.

Copy link
Contributor

@nicholasrice nicholasrice left a comment

Choose a reason for hiding this comment

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

approved pending the git commit history being cleaned up.

@chrisdholt chrisdholt merged commit 050dc8f into master Sep 29, 2021
@chrisdholt chrisdholt deleted the users/robarb/slider-mouseup branch September 29, 2021 01:50
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.

fix: slider's thumb stays active after you go outside the container element