mirror of
https://github.com/enso-org/enso.git
synced 2024-12-30 16:41:32 +03:00
e0ef0a258d
- Closes #7463 - Makes table header sticky - Clips table body so it does not overlap table header Other changes: - Clip table header row so it does not overlap extra columns selector - Hide extra columns selector on local backend (PM backend) - Focus search bar if the keypress will type regular text - Change row height from 40px to 32px - Add "Share" button when the editor is open - Make entire area of backend selector (Cloud <-> Local) clickable (previously, the padding was not clickable) - Remove the up-arrow icon to open a project. Projects are now opened by switching to the project tab using the tab selector on the top left (or by double clicking the row). - Fix opening newly created folder (previously its entries were appended to the end, rather than under the folder) - Indent background of "name" column (the first column) - Minor code style changes - Add background back to "change password" modal (oops) - Hide "open" context menu entry and show "stop" entry, when a project is currently running - ℹ️ It might be a good idea to support the "open" action on directories as well, however it is difficult without the assets table refactor in #7540. As such, this functionality will not be added in this PR. - Fix horizontal padding on "sign in" user menu entry - Hide email/password validation when using oauth logins More fixes for assets list: - Project is inserted at start of list when there are no existing projects - Project is inserted at start of children when there are no existing children - Deleting a folder collapses it (hides its descendants) - Adding children to a newly created folder puts them at the correct depth, rather than depth 1 # Important Notes None
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
/** @file Debug-only functions, injected or stripped by the build tool as appropriate. */
|
|
|
|
/** The logger used by {@link assert}. */
|
|
interface Logger {
|
|
error: (message: string) => void
|
|
}
|
|
|
|
/** Logs an error . */
|
|
export function assert(invariant: boolean, message: string, logger: Logger = console) {
|
|
if (!invariant) {
|
|
logger.error('assertion failed: ' + message)
|
|
}
|
|
}
|
|
|
|
// This is required to make the definition `Object.prototype.$d$` not error.
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
declare global {
|
|
// Documentation is already inherited.
|
|
/** */
|
|
interface Object {
|
|
/** Log self and return self. */
|
|
$d$: <T>(this: T, message?: string) => T
|
|
}
|
|
}
|
|
|
|
if (!('$d$' in Object.prototype)) {
|
|
Object.defineProperty(Object.prototype, '$d$', {
|
|
/** Log self and return self. */
|
|
value: function <T>(this: T, message?: string) {
|
|
if (message != null) {
|
|
console.log(message, this)
|
|
} else {
|
|
console.log(this)
|
|
}
|
|
return this
|
|
},
|
|
enumerable: false,
|
|
writable: false,
|
|
configurable: false,
|
|
})
|
|
}
|