Extracted main-nav to seperate ts file
Refactored all logic related to .main-nav from jQuery-based JavaScript to modular, strongly typed TypeScript. The changes include:
- Moving
.main-navrelated logic to a new TypeScript file:Control.MenuAndTitleBar.ts - Replacing all jQuery DOM manipulations (
addClass,removeClass,prepend,css, etc.) with vanilla TypeScript equivalents - Encapsulating
.main-navbehavior as methods within theMenuAndTitleBarclass - Providing exported methods like
setNotebookbar,getMainNavWidth,showMainNav,hideMainNav,isMainNavHidden, andresetMainNavHeaderfor use in other modules - Updating external files (
UIManager,Notebookbar,Toolbar) to call these TypeScript methods instead of using jQuery
- Resolves: #11959
Thanks for opening this pull request!
Things that will help get your PR across the finish line:
- Check out our contributing guidelines.
- Connect with us through one of our communication channels.
- Click on the details link next to the failing CI checks, if any, to see an explanation on how to fix it.
- Feel free to ping @pedropintosilva or the mentor of the easyHack you are solving if you need help.
thanks and welcome @maddie0501 !
There are some missing steps to pass the CI :)
Do sign- off your commits and Add Change -id.
Sign-off (DCO)
You should only do this if:
To add your Signed-off-by line to every commit in this branch:
Ensure you have a local copy of your branch by checking out the pull request locally via command line. In your local branch, run: git rebase HEAD~2 --signoff Force push your changes to overwrite the branch: git push --force-with-lease origin Switch-between-spreadsheet-tabs
Change-id
How to obtain Change-Id in commit message :
copy commit hook : cp .git-hooks/commit-msg .git/hooks/commit-msg
And then amend your commit message : git commit --amend git push -f
Hi @Darshan-upadhyay1110 I have done the above changes
Hello @maddie0501 thanks for the sign-off but it seem you only did sign-off your last commit. But as it defined in DOC all commits should be signed off. https://github.com/CollaboraOnline/online/pull/12126/checks?check_run_id=43896069996
Sorry i think my last comment miss-leaded you :bow:
Also there are some warnings i see in code, can you please address those ? it seems few variables and conditions are dead code...
Also as last step please rebase this pacth with latest online master, That would fix the issues currently as you were seeing as Red CI :)
you can delete the last commit (formatting changes) and modify first one with amend to get signoff right. Then DCO check will pass :)
Good to have formatting nice, but we can have just a code change here and will be good. Thanks!
Hey I have done the changes..
build error is:
TSC tscompile.done
src/control/Control.MenuAndTitleBar.ts(59,31): error TS2339: Property 'scrollbarWidth' does not exist on type 'CSSStyleDeclaration'.
https://cpci.cbg.collabora.co.uk:8080/job/github_online_master_debug_vs_co-25.04_cypress_desktop/2095/console
closing due to no activity and code which has many conflicts already