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 #993: Tie channel selection to probe.info.history options #996

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Changelog

## [unreleased](https://github.com/mozilla/glam/compare/2020.10.1...HEAD) (date TBD)
## [unreleased](https://github.com/mozilla/glam/compare/2020.10.3...HEAD) (date TBD)

- Attach desktop channels to probe.info.history keys
([#996](https://github.com/mozilla/glam/pull/996))
- Parse glean descriptions with markdown
([#995](https://github.com/mozilla/glam/pull/995))
- Expand widths of main content for larger displays
Expand Down
7 changes: 6 additions & 1 deletion src/config/firefox-desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
],
defaultValue: 'nightly',
isValidKey(key, probe) {
return (probe.prerelease && key !== 'release') || !probe.prerelease;
return key in probe.info.history;
},
},
os: {
Expand Down Expand Up @@ -178,9 +178,14 @@ export default {
const newProcess = probe.info.calculated.seen_in_processes[0];
store.setDimension('process', newProcess);
}
// If channel isn't included in history, reset state to channel that is
if (!(state.productDimensions.channel in probe.info.history)) {
store.setDimension('channel', Object.keys(probe.info.history)[0]);
}
// accommodate prerelease-only probes by resetting to nightly (if needed)
if (
state.productDimensions.channel === 'release' &&
'release' in probe.info.history &&
!probe.info.history.release[0].optout
) {
store.setDimension('channel', 'nightly');
Expand Down