message: Meta: Move new features to the top on the Options page
diff: @@ -81,12 +81,18 @@ async function validateToken(): Promise<void> {
  }
  }
  -function moveDisabledFeaturesToTop(): void {
  +function moveNewAndDisabledFeaturesToTop(): void {
  const container = select('.js-features')!;
  +
  for (const unchecked of select.all('.feature [type=checkbox]:not(:checked)', container).reverse()) {
  // .reverse() needed to preserve alphabetical order while prepending
  container.prepend(unchecked.closest('.feature')!);
  }
  +
  + for (const newFeature of select.all('.feature-new', container).reverse()) {
  + // .reverse() needed to preserve alphabetical order while prepending
  + container.prepend(newFeature);
  + }
  }
  function buildFeatureCheckbox({id, description, screenshot}: FeatureMeta): HTMLElement {
  @@ -159,8 +165,8 @@ async function generateDom(): Promise<void> {
  await perDomainOptions.syncForm('form');
  // Decorate list
  - moveDisabledFeaturesToTop();
  - void highlightNewFeatures();
  + await highlightNewFeatures();
  + moveNewAndDisabledFeaturesToTop();
  void validateToken();
  // Move debugging tools higher when side-loaded
  