-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: Exit Button #6763
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
base: develop
Are you sure you want to change the base?
feat: Exit Button #6763
Conversation
helper.exitPad = async () => { | ||
const button = helper.exitButton(); | ||
button.trigger('click'); | ||
await helper.waitForPromise(() => window.location.pathname === '/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test would be good for that :)
@@ -217,3 +217,7 @@ exports.focusOnLine = (ace) => { | |||
} | |||
// End of setSelection / set Y position of editor | |||
}; | |||
|
|||
// toolbar.registerCommand('exit', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be left out
@@ -381,6 +381,10 @@ exports.padeditbar = new class { | |||
$('.exportlink').first().trigger('focus'); | |||
} | |||
}); | |||
this.registerCommand('exit', () => { | |||
console.log('Exit button clicked'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this console.log statement
@@ -381,6 +381,10 @@ exports.padeditbar = new class { | |||
$('.exportlink').first().trigger('focus'); | |||
} | |||
}); | |||
this.registerCommand('exit', () => { | |||
console.log('Exit button clicked'); | |||
window.location.href = '/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also relative url is important for this to work
This feature adds an exit Button to the top right of the toolbar, making it easy for the user to nav back to the home, initially the user had to edit the browser endpoints inorder to moveback to the home page. now with the exit button it is pretty much a click away!
This is my first OSS contribution, changes are welcome