-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add PageControl to preferences language carousel #71
Comments
We can start with this: Subject: [PATCH] factor out icon height for maintainability if asset, https://github.com/phetsims/joist/issues/919
---
Index: js/common/view/LanguageAndVoiceControl.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/common/view/LanguageAndVoiceControl.ts b/js/common/view/LanguageAndVoiceControl.ts
--- a/js/common/view/LanguageAndVoiceControl.ts (revision a5f5ba8c559bc5954e0f2cec7b029ccc08636309)
+++ b/js/common/view/LanguageAndVoiceControl.ts (date 1681321449211)
@@ -8,7 +8,7 @@
*/
import numberSuiteCommon from '../../numberSuiteCommon.js';
-import { HBox, HBoxOptions, Node, RichText, RichTextOptions, Text, TextOptions, VBox } from '../../../../scenery/js/imports.js';
+import { Color, HBox, HBoxOptions, Node, RichText, RichTextOptions, Text, TextOptions, VBox } from '../../../../scenery/js/imports.js';
import optionize, { combineOptions, EmptySelfOptions } from '../../../../phet-core/js/optionize.js';
import { Locale } from '../../../../joist/js/i18n/localeProperty.js';
import Property from '../../../../axon/js/Property.js';
@@ -21,6 +21,7 @@
import StringUtils from '../../../../phetcommon/js/util/StringUtils.js';
import NumberSuiteCommonUtteranceQueue from './NumberSuiteCommonUtteranceQueue.js';
import Multilink from '../../../../axon/js/Multilink.js';
+import PageControl from '../../../../sun/js/PageControl.js';
const LABEL_TEXT_OPTIONS = {
fontWeight: 'bold',
@@ -98,6 +99,17 @@
const voiceCarouselLabel = new Text( NumberSuiteCommonStrings.voiceStringProperty, textOptions );
const noVoiceDescriptionNode = new NoVoiceDescriptionNode( languageCarouselWidth, languageCarousel.height );
+ // TODO: radius/color/other stuff
+ const pageControl = new PageControl( languageCarousel.pageNumberProperty, languageCarousel.numberOfPagesProperty, {
+ orientation: 'vertical',
+ pageFill: Color.WHITE,
+ pageStroke: Color.BLACK,
+ currentPageStroke: Color.TRANSPARENT,
+ interactive: true,
+ dotTouchAreaDilation: 4,
+ dotMouseAreaDilation: 4
+ } );
+
const voiceControlVBox = new VBox( {
children: [ voiceCarouselLabel, voiceCarousel ],
spacing: LABEL_Y_SPACING,
@@ -109,7 +121,8 @@
options.children = [
new VBox( {
- children: [ languageCarouselLabel, languageCarousel ],
+ // TODO: actually we want the label to align with the carousel
+ children: [ languageCarouselLabel, new HBox( { spacing: 5, children: [ pageControl, languageCarousel ] } ) ],
spacing: LABEL_Y_SPACING,
align: 'left'
} ), |
zepumph
added a commit
to phetsims/circuit-construction-kit-common
that referenced
this issue
Apr 12, 2023
zepumph
added a commit
to phetsims/build-a-molecule
that referenced
this issue
Apr 12, 2023
zepumph
added a commit
to phetsims/function-builder
that referenced
this issue
Apr 12, 2023
chrisklus
added a commit
that referenced
this issue
Apr 12, 2023
chrisklus
added a commit
that referenced
this issue
Apr 12, 2023
chrisklus
added a commit
to phetsims/number-play
that referenced
this issue
Apr 12, 2023
Patch applied |
17 tasks
For QA: A "PageControl" (dots next to a carousel was added for the language selection in this version. please confirm it works as expected, try to break it, and close if all is well. It is expected to be hidden if there is just one "page" of languages. |
This is working as expected in rc.2. Closing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From discussion with @amanda-phet and @zepumph we realized that the locale carousel should have a page control since there are so many pages to scroll through!
Tagging phetsims/qa#929
The text was updated successfully, but these errors were encountered: