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: Fill styling for sliders #183

Merged
merged 16 commits into from
Apr 3, 2023
Merged

Fix: Fill styling for sliders #183

merged 16 commits into from
Apr 3, 2023

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Mar 21, 2023

fixes #177

Fix

  • Allow fill styling in slider track

EDIT:

Fix

  • Added index to each model item
  • Removed index to value calculations
  • Set up handle sizing
  • Corrected fill alignment
  • Corrected number alignment
  • Corrected slider bar alignment
  • Corrected correct answer range alignment
  • Nested input fill inside of input track

@oliverfoster oliverfoster self-assigned this Mar 21, 2023
@swashbuck
Copy link
Contributor

swashbuck commented Mar 21, 2023

Do we still want to change the color of the fill based on correct vs. incorrect? If so, we can borrow the styles from the deprecated rangeslider.

Then, what should we do when showing the correct answer when it is a range?

Should the fill extend to where the handle is (below 70)?

Should the fill span only over the correct range (50 - 90)?

@swashbuck
Copy link
Contributor

swashbuck commented Mar 21, 2023

Also wondering if we should hide the handle after the question has been submitted.

@oliverfoster
Copy link
Member Author

oliverfoster commented Mar 22, 2023

Incorrect red, yes.
Should the fill extend to where the handle is (below 70), yes.
Hide handle, yes.

The fill describes the user's selection (width) and correctness (color). But not the correct range. Otherwise the ui is switching its function.

@oliverfoster
Copy link
Member Author

@swashbuck would you mind picking up the remaining work?

@swashbuck
Copy link
Contributor

@swashbuck would you mind picking up the remaining work?

@oliverfoster Sure!

@swashbuck swashbuck self-assigned this Mar 22, 2023
@oliverfoster oliverfoster marked this pull request as ready for review March 23, 2023 10:28
Copy link
Contributor

@kirsty-hames kirsty-hames left a comment

Choose a reason for hiding this comment

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

Looking good thanks @swashbuck. Tested on Mac Safari, Chrome and FF. iPhone and Android tablet.

@guywillis
Copy link
Contributor

Made a few adjustments / optimisations in the plugin and moved the styling parts to the vanilla theme to pick up - adaptlearning/adapt-contrib-vanilla#408

@guywillis guywillis self-assigned this Mar 27, 2023
Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

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

Tested on Windows machine, Chrome, Edge and Firefox, all seems to be working nicely.

@guywillis @oliverfoster @swashbuck one query, if you answer incorrectly and click show correct answer you see the range of correct answers, if you get the question right you only see your answer, would it make sense to see the range if you answer correctly?

@kirsty-hames kirsty-hames self-requested a review March 28, 2023 16:14
Copy link
Contributor

@kirsty-hames kirsty-hames left a comment

Choose a reason for hiding this comment

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

I've just given this another test on the same spec above to review the latest commits. Looks good thanks.

@oliverfoster
Copy link
Member Author

Tested on Windows machine, Chrome, Edge and Firefox, all seems to be working nicely.

@guywillis @oliverfoster @swashbuck one query, if you answer incorrectly and click show correct answer you see the range of correct answers, if you get the question right you only see your answer, would it make sense to see the range if you answer correctly?

This pr is meant to fix the existing implementation and return it to functionality. Discussions about new behaviour or behaviour changes should be put into a separate issue. But, sure. Sounds like a good idea.

@oliverfoster oliverfoster merged commit 1e63ba0 into master Apr 3, 2023
@oliverfoster oliverfoster deleted the issue/177 branch April 3, 2023 07:47
github-actions bot pushed a commit that referenced this pull request Apr 3, 2023
## [4.3.5](v4.3.4...v4.3.5) (2023-04-03)

### Fix

* Fill styling for sliders (#183) ([1e63ba0](1e63ba0)), closes [#183](#183)
github-actions bot pushed a commit to nagyist/adapt-contrib-slider that referenced this pull request Mar 3, 2025
# [2.2.0](v2.1.6...v2.2.0) (2025-03-03)

### accessibility

* issue/#2165 updated component description (adaptlearning#134) ([392f9db](392f9db)), closes [issue/#2165](https://github.com/nagyist/adapt-contrib-slider/issues/2165) [adaptlearning#134](https://github.com/nagyist/adapt-contrib-slider/issues/134) [issue/#2165](https://github.com/nagyist/adapt-contrib-slider/issues/2165)

### chore

* added package.json (adaptlearning#149) ([45b1f37](45b1f37)), closes [adaptlearning#149](https://github.com/nagyist/adapt-contrib-slider/issues/149) [#3072](https://github.com/nagyist/adapt-contrib-slider/issues/3072)

### Chore

* Add support for new issue experience (fixes adaptlearning#216) (adaptlearning#219) ([662cbd1](662cbd1)), closes [adaptlearning#216](https://github.com/nagyist/adapt-contrib-slider/issues/216) [adaptlearning#219](https://github.com/nagyist/adapt-contrib-slider/issues/219)
* e2e tests on slider component (Issue/201) (adaptlearning#202) ([4e21470](4e21470)), closes [adaptlearning#202](https://github.com/nagyist/adapt-contrib-slider/issues/202)

### Fix

* _globals schema nesting (adaptlearning#179) ([960acc5](960acc5)), closes [adaptlearning#179](https://github.com/nagyist/adapt-contrib-slider/issues/179)
* Add ariaQuestion to slider (fixes: 170) (adaptlearning#171) ([e1c0d42](e1c0d42)), closes [adaptlearning#171](https://github.com/nagyist/adapt-contrib-slider/issues/171)
* Add scale context to slider start and end labels (adaptlearning#176) ([68f06bf](68f06bf)), closes [adaptlearning#176](https://github.com/nagyist/adapt-contrib-slider/issues/176)
* Added gitignore for release automation (adaptlearning#162) ([cb1c282](cb1c282)), closes [adaptlearning#162](https://github.com/nagyist/adapt-contrib-slider/issues/162)
* Added release automation (adaptlearning#160) ([10a000f](10a000f)), closes [adaptlearning#160](https://github.com/nagyist/adapt-contrib-slider/issues/160)
* Allow floats in slider position to item selection (fixes adaptlearning#193) (adaptlearning#194) ([a336e60](a336e60)), closes [adaptlearning#193](https://github.com/nagyist/adapt-contrib-slider/issues/193) [adaptlearning#194](https://github.com/nagyist/adapt-contrib-slider/issues/194)
* Allow slide step prefix and suffix (fixes adaptlearning#173) ([3bf8723](3bf8723)), closes [adaptlearning#173](https://github.com/nagyist/adapt-contrib-slider/issues/173)
* aria-valuetext attribute added to the slider to read out scaleStepPrefix/scaleStepSuffix (fixes adaptlearning#211) (adaptlearning#212) ([f4f88cc](f4f88cc)), closes [adaptlearning#211](https://github.com/nagyist/adapt-contrib-slider/issues/211) [adaptlearning#212](https://github.com/nagyist/adapt-contrib-slider/issues/212) [adaptlearning#211](https://github.com/nagyist/adapt-contrib-slider/issues/211)
* ariaScaleName property added (adaptlearning#192) ([c8737a1](c8737a1)), closes [adaptlearning#192](https://github.com/nagyist/adapt-contrib-slider/issues/192)
* Bump braces from 3.0.2 to 3.0.3 (adaptlearning#208) ([70808b8](70808b8)), closes [adaptlearning#208](https://github.com/nagyist/adapt-contrib-slider/issues/208)
* Bump http-cache-semantics from 4.1.0 to 4.1.1 (adaptlearning#174) ([bee20a7](bee20a7)), closes [adaptlearning#174](https://github.com/nagyist/adapt-contrib-slider/issues/174)
* Convert focus to focus-visible (fixes adaptlearning#166) ([872d607](872d607)), closes [adaptlearning#166](https://github.com/nagyist/adapt-contrib-slider/issues/166)
* Convert hbs to jsx template (fixes adaptlearning#163) (adaptlearning#164) ([897b3e4](897b3e4)), closes [adaptlearning#163](https://github.com/nagyist/adapt-contrib-slider/issues/163) [adaptlearning#164](https://github.com/nagyist/adapt-contrib-slider/issues/164)
* Feedback title/altTitle documentation and schema updates (adaptlearning#180) ([5ec2413](5ec2413)), closes [adaptlearning#180](https://github.com/nagyist/adapt-contrib-slider/issues/180)
* Fill styling for sliders (adaptlearning#183) ([1e63ba0](1e63ba0)), closes [adaptlearning#183](https://github.com/nagyist/adapt-contrib-slider/issues/183)
* included scale step in input slider jsx (fix adaptlearning#187) (adaptlearning#190) ([4c9df59](4c9df59)), closes [adaptlearning#187](https://github.com/nagyist/adapt-contrib-slider/issues/187) [adaptlearning#190](https://github.com/nagyist/adapt-contrib-slider/issues/190)
* missing attribute values causing runtime error (adaptlearning#205) ([a85cdaf](a85cdaf)), closes [adaptlearning#205](https://github.com/nagyist/adapt-contrib-slider/issues/205) [adaptlearning#204](https://github.com/nagyist/adapt-contrib-slider/issues/204)
* moved striphtml function outside loop (fixes adaptlearning#207) ([79d5d69](79d5d69)), closes [adaptlearning#207](https://github.com/nagyist/adapt-contrib-slider/issues/207)
* Remove rangeslider library styles (fixes adaptlearning#175) ([83fafa3](83fafa3)), closes [adaptlearning#175](https://github.com/nagyist/adapt-contrib-slider/issues/175)
* role added to component__widget div (fixes adaptlearning#209) (adaptlearning#210) ([b66020c](b66020c)), closes [adaptlearning#209](https://github.com/nagyist/adapt-contrib-slider/issues/209) [adaptlearning#210](https://github.com/nagyist/adapt-contrib-slider/issues/210)
* String defaults for scaleStepPrefix and scaleStepSuffix (adaptlearning#186) ([3de631c](3de631c)), closes [adaptlearning#186](https://github.com/nagyist/adapt-contrib-slider/issues/186)
* Version numbers removed from Readme files ([2c7cb8f](2c7cb8f))
* Vertically center number in selection circle (fixes adaptlearning#200) ([4b35712](4b35712)), closes [adaptlearning#200](https://github.com/nagyist/adapt-contrib-slider/issues/200)

### New

* Added support for _canShowCorrectness (adaptlearning#213) ([a73560a](a73560a)), closes [adaptlearning#213](https://github.com/nagyist/adapt-contrib-slider/issues/213)
* Issue and pr project addition automation (refs adaptlearning/adapt_framework#3315) (adaptlearning#159) ([984a912](984a912)), closes [adaptlearning#159](https://github.com/nagyist/adapt-contrib-slider/issues/159)
* Provide default instruction text (fixes adaptlearning#167) (adaptlearning#168) ([181afa8](181afa8)), closes [adaptlearning#167](https://github.com/nagyist/adapt-contrib-slider/issues/167) [adaptlearning#168](https://github.com/nagyist/adapt-contrib-slider/issues/168)
* use native slider instead of rangeslider (fixes adaptlearning#161) ([2c524f5](2c524f5)), closes [adaptlearning#161](https://github.com/nagyist/adapt-contrib-slider/issues/161)

### Update

* remove ariaQuestion placeholder text (fixes adaptlearning#196) adaptlearning#197 ([832bd98](832bd98)), closes [adaptlearning#196](https://github.com/nagyist/adapt-contrib-slider/issues/196) [adaptlearning#197](https://github.com/nagyist/adapt-contrib-slider/issues/197)
* remove implied aria properties from <input type="range"> (adaptlearning#195) ([f79e5bf](f79e5bf)), closes [adaptlearning#195](https://github.com/nagyist/adapt-contrib-slider/issues/195)

### Upgrade

* Bump ip from 1.1.8 to 1.1.9 (adaptlearning#199) ([d585fc2](d585fc2)), closes [adaptlearning#199](https://github.com/nagyist/adapt-contrib-slider/issues/199)
* Bump yaml and semantic-release (adaptlearning#188) ([aa11148](aa11148)), closes [adaptlearning#188](https://github.com/nagyist/adapt-contrib-slider/issues/188)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing fill styling in native slider
6 participants