codemagic-ci-cd / codemagic-docs

Here you’ll find some essential information for setting up CI/CD for your mobile apps with Codemagic.
https://docs.codemagic.io
MIT License
84 stars 120 forks source link

Fix: scroll menu to active item #2851

Closed artemii-yanushevskyi closed 3 days ago

artemii-yanushevskyi commented 3 days ago

In order to fix https://github.com/codemagic-dev/codemagic/issues/653, I had to adjust order of on ready calls:

  1. setInitialPreference to set relevant items be displayed in the menu
  2. openActiveCategory to open active category
  3. Finally, after relevant items are displayed and positioned, scrollMenuToActive to scroll to active menu item

Adjusting the order allowed to remove duplicate openActiveCategory call.

QA locally

Scroll to active menu item works for: ✅ YAML menu ✅ Workflow editor menu

AstDaria commented 3 days ago

let's add

html {
    scroll-behavior: smooth;
}

to main.scss file, to make scroll more smooth