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: Downgrade Spectrum to 3.33.1 #1978

Merged
merged 1 commit into from
May 1, 2024

Conversation

bmingles
Copy link
Contributor

@bmingles bmingles commented May 1, 2024

Downgraded Spectrum to 3.33.1 to fix Combobox scrolling.

resolves #1976

Copy link
Contributor

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

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

Version bump only. Don't do extra stuff in this PR.

Comment on lines 46 to 105
const numberToName: Record<string, string> = {
0: '',
1: 'One',
2: 'Two',
3: 'Three',
4: 'Four',
5: 'Five',
6: 'Six',
7: 'Seven',
8: 'Eight',
9: 'Nine',
10: 'Ten',
11: 'Eleven',
12: 'Twelve',
13: 'Thirteen',
14: 'Fourteen',
15: 'Fifteen',
16: 'Sixteen',
17: 'Seventeen',
18: 'Eighteen',
19: 'Nineteen',
20: 'Twenty',
30: 'Thirty',
40: 'Forty',
50: 'Fifty',
60: 'Sixty',
70: 'Seventy',
80: 'Eighty',
90: 'Ninety',
} as const;

function createOptions() {
const options = [];

for (let hundreds = 0; hundreds <= 200; hundreds += 100) {
for (let tens = 0; tens <= 90; tens += 10) {
for (let ones = 0; ones <= 9; ones += 1) {
if (hundreds > 0 || tens > 0 || ones > 0) {
const value = String(hundreds + tens + ones);

const tensAndOnes =
tens <= 10
? numberToName[tens + ones]
: `${numberToName[tens]} ${numberToName[ones]}`;

const title =
hundreds === 0
? tensAndOnes
: `${numberToName[hundreds / 100]} Hundred ${tensAndOnes}`;

options.push({ title, value });
}
}
}
}

return options;
}

const options = createOptions();
Copy link
Contributor

Choose a reason for hiding this comment

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

This a lot of code that we don't really need to be so fancy and provides no real value. Item ${i} would be more than enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was trying to avoid having to change e2e snapshot, but that's fair. I may just remove it since it didn't produce the original problem anyway

@bmingles bmingles merged commit a0cb5bf into deephaven:main May 1, 2024
9 checks passed
@bmingles bmingles deleted the 1976-downgrade-spectrum branch May 1, 2024 19:18
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
@mofojed
Copy link
Member

mofojed commented May 2, 2024

@bmingles This should have been marked as a fix instead of a chore. Chores don't appear in the release notes; we're doing this PR specifically because it fixes a bug.

I've manually added to release notes as a fix.

@bmingles bmingles changed the title chore: Downgrade Spectrum to 3.33.1 fix: Downgrade Spectrum to 3.33.1 May 3, 2024
@bmingles
Copy link
Contributor Author

bmingles commented May 3, 2024

@mofojed I changed the title to fix. I don't see this in the release notes. Did you update it? nvm, I see it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downgrade Spectrum to 3.33 fix Combobox scrolling
3 participants