mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
fix(docs): correct typos in comments and strings found during code view (#5880)
Non-functional changes only: - Fixed minor spelling mistakes in comments - Corrected typos in user-facing strings - No variables, logic, or functional code was modified. Signed-off-by: Marcel Petrick <mail@marcelpetrick.it> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5880-fix-docs-correct-typos-in-comments-and-strings-found-during-code-view-27f6d73d3650815db62af6115991304a) by [Unito](https://www.unito.io) --------- Signed-off-by: Marcel Petrick <mail@marcelpetrick.it> Co-authored-by: Alexander Brown <DrJKL0424@gmail.com> Co-authored-by: Benjamin Lu <benjaminlu1107@gmail.com>
This commit is contained in:
@@ -152,7 +152,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Everthing below here to be cleaned up over time. */
|
||||
/* Everything below here to be cleaned up over time. */
|
||||
|
||||
body {
|
||||
width: 100vw;
|
||||
|
||||
@@ -1125,7 +1125,7 @@ export interface paths {
|
||||
}
|
||||
get?: never
|
||||
put?: never
|
||||
/** Create a new custom node using admin priviledge */
|
||||
/** Create a new custom node using admin privilege */
|
||||
post: operations['adminCreateNode']
|
||||
delete?: never
|
||||
options?: never
|
||||
@@ -16383,7 +16383,7 @@ export interface operations {
|
||||
}
|
||||
}
|
||||
responses: {
|
||||
/** @description Webhook processed succesfully */
|
||||
/** @description Webhook processed successfully */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown
|
||||
|
||||
@@ -69,7 +69,7 @@ const terminalCreated = (
|
||||
await loadLogEntries()
|
||||
} catch (err) {
|
||||
console.error('Error loading logs', err)
|
||||
// On older backends the endpoints wont exist
|
||||
// On older backends the endpoints won't exist
|
||||
errorMessage.value =
|
||||
'Unable to load logs, please ensure you have updated your ComfyUI backend.'
|
||||
return
|
||||
|
||||
@@ -344,7 +344,7 @@ export const SERVER_CONFIG_ITEMS: ServerConfig<any>[] = [
|
||||
type: 'number',
|
||||
defaultValue: null,
|
||||
tooltip:
|
||||
'Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reverved depending on your OS.'
|
||||
'Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reserved depending on your OS.'
|
||||
},
|
||||
|
||||
// Misc settings
|
||||
|
||||
@@ -135,7 +135,7 @@ function addProxyFromOverlay(subgraphNode: SubgraphNode, overlay: Overlay) {
|
||||
* @param {string} property - The name of the accessed value.
|
||||
* Checked for conditional logic, but never changed
|
||||
* @param {object} receiver - The object the result is set to
|
||||
* and the vlaue used as 'this' if property is a get/set method
|
||||
* and the value used as 'this' if property is a get/set method
|
||||
* @param {unknown} value - only used on set calls. The thing being assigned
|
||||
*/
|
||||
const handler = {
|
||||
|
||||
@@ -147,7 +147,7 @@ app.registerExtension({
|
||||
// @ts-expect-error fixme ts strict error
|
||||
node[WEBCAM_READY].then((v) => {
|
||||
video = v
|
||||
// If width isnt specified then use video output resolution
|
||||
// If width isn't specified then use video output resolution
|
||||
// @ts-expect-error fixme ts strict error
|
||||
if (!w.value) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
|
||||
@@ -149,7 +149,7 @@ export class PrimitiveNode extends LGraphNode {
|
||||
target_slot: number
|
||||
) {
|
||||
// Fires before the link is made allowing us to reject it if it isn't valid
|
||||
// No widget, we cant connect
|
||||
// No widget, we can't connect
|
||||
if (!input.widget && !(input.type in ComfyWidgets)) {
|
||||
return false
|
||||
}
|
||||
@@ -388,7 +388,7 @@ export class PrimitiveNode extends LGraphNode {
|
||||
}
|
||||
|
||||
onLastDisconnect() {
|
||||
// We cant remove + re-add the output here as if you drag a link over the same link
|
||||
// We can't remove + re-add the output here as if you drag a link over the same link
|
||||
// it removes, then re-adds, causing it to break
|
||||
this.outputs[0].type = '*'
|
||||
this.outputs[0].name = 'connect to widget input'
|
||||
@@ -595,7 +595,7 @@ app.registerExtension({
|
||||
|
||||
this.graph?.add(node)
|
||||
|
||||
// Calculate a position that wont directly overlap another node
|
||||
// Calculate a position that won't directly overlap another node
|
||||
const pos: [number, number] = [
|
||||
this.pos[0] - node.size[0] - 30,
|
||||
this.pos[1]
|
||||
|
||||
@@ -146,8 +146,8 @@ Litegraph has no runtime dependencies. The build tooling has been tested on Node
|
||||
|
||||
Use GitHub actions to release normal versions.
|
||||
|
||||
1. Run the `Release a New Version` action, selecting the version incrment type
|
||||
1. Merge the resultion PR
|
||||
1. Run the `Release a New Version` action, selecting the version increment type
|
||||
1. Merge the resolution PR
|
||||
1. A GitHub release is automatically published on merge
|
||||
|
||||
### Pre-release
|
||||
|
||||
@@ -1126,7 +1126,7 @@ export class LGraph
|
||||
/**
|
||||
* Snaps the provided items to a grid.
|
||||
*
|
||||
* Item positions are reounded to the nearest multiple of {@link LiteGraph.CANVAS_GRID_SIZE}.
|
||||
* Item positions are rounded to the nearest multiple of {@link LiteGraph.CANVAS_GRID_SIZE}.
|
||||
*
|
||||
* When {@link LiteGraph.alwaysSnapToGrid} is enabled
|
||||
* and the grid size is falsy, a default of 1 is used.
|
||||
|
||||
@@ -461,7 +461,7 @@ export class LGraphCanvas
|
||||
}
|
||||
|
||||
const baseFontSize = LiteGraph.NODE_TEXT_SIZE // 14px
|
||||
const dprAdjustment = Math.sqrt(window.devicePixelRatio || 1) //Using sqrt here because higher DPR monitors do not linearily scale the readability of the font, instead they increase the font by some heurisitc, and to approximate we use sqrt to say bascially a DPR of 2 increases the readibility by 40%, 3 by 70%
|
||||
const dprAdjustment = Math.sqrt(window.devicePixelRatio || 1) //Using sqrt here because higher DPR monitors do not linearily scale the readability of the font, instead they increase the font by some heurisitc, and to approximate we use sqrt to say basically a DPR of 2 increases the readability by 40%, 3 by 70%
|
||||
|
||||
// Calculate the zoom level where text becomes unreadable
|
||||
this._lowQualityZoomThreshold =
|
||||
@@ -547,7 +547,7 @@ export class LGraphCanvas
|
||||
linkMarkerShape: LinkMarkerShape = LinkMarkerShape.Circle
|
||||
links_render_mode: number
|
||||
/** Minimum font size in pixels before switching to low quality rendering.
|
||||
* This intializes first and if we cant get the value from the settings we default to 8px
|
||||
* This initializes first and if we can't get the value from the settings we default to 8px
|
||||
*/
|
||||
private _min_font_size_for_lod: number = 8
|
||||
|
||||
@@ -1228,7 +1228,7 @@ export class LGraphCanvas
|
||||
className: 'event'
|
||||
})
|
||||
}
|
||||
// add callback for modifing the menu elements onMenuNodeOutputs
|
||||
// add callback for modifying the menu elements onMenuNodeOutputs
|
||||
const retEntries = node.onMenuNodeOutputs?.(entries)
|
||||
if (retEntries) entries = retEntries
|
||||
|
||||
@@ -3902,7 +3902,7 @@ export class LGraphCanvas
|
||||
for (const item of [...parsed.nodes, ...parsed.reroutes]) {
|
||||
if (item.pos == null)
|
||||
throw new TypeError(
|
||||
'Invalid node encounterd on paste. `pos` was null.'
|
||||
'Invalid node encountered on paste. `pos` was null.'
|
||||
)
|
||||
|
||||
if (item.pos[0] < offsetX) offsetX = item.pos[0]
|
||||
@@ -6818,7 +6818,7 @@ export class LGraphCanvas
|
||||
canvas.focus()
|
||||
root_document.body.style.overflow = ''
|
||||
|
||||
// important, if canvas loses focus keys wont be captured
|
||||
// important, if canvas loses focus keys won't be captured
|
||||
setTimeout(() => canvas.focus(), 20)
|
||||
dialog.remove()
|
||||
}
|
||||
@@ -7095,7 +7095,7 @@ export class LGraphCanvas
|
||||
)
|
||||
}
|
||||
} else {
|
||||
// console.warn("cant find slot " + options.slot_from);
|
||||
// console.warn("can't find slot " + options.slot_from);
|
||||
}
|
||||
}
|
||||
if (options.node_to) {
|
||||
@@ -7140,7 +7140,7 @@ export class LGraphCanvas
|
||||
)
|
||||
}
|
||||
} else {
|
||||
// console.warn("cant find slot_nodeTO " + options.slot_from);
|
||||
// console.warn("can't find slot_nodeTO " + options.slot_from);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7478,7 +7478,7 @@ export class LGraphCanvas
|
||||
return dialog
|
||||
}
|
||||
|
||||
// TODO refactor, theer are different dialog, some uses createDialog, some dont
|
||||
// TODO refactor, there are different dialog, some uses createDialog, some dont
|
||||
createDialog(html: string, options: IDialogOptions): IDialog {
|
||||
const def_options = {
|
||||
checkForInput: false,
|
||||
|
||||
@@ -167,8 +167,8 @@ input|output: every connection
|
||||
general properties:
|
||||
+ clip_area: if you render outside the node, it will be clipped
|
||||
+ unsafe_execution: not allowed for safe execution
|
||||
+ skip_repeated_outputs: when adding new outputs, it wont show if there is one already connected
|
||||
+ resizable: if set to false it wont be resizable with the mouse
|
||||
+ skip_repeated_outputs: when adding new outputs, it won't show if there is one already connected
|
||||
+ resizable: if set to false it won't be resizable with the mouse
|
||||
+ widgets_start_y: widgets start at y distance from the top of the node
|
||||
|
||||
flags object:
|
||||
@@ -902,7 +902,7 @@ export class LGraphNode
|
||||
|
||||
if (this.onSerialize?.(o))
|
||||
console.warn(
|
||||
'node onSerialize shouldnt return anything, data should be stored in the object pass in the first parameter'
|
||||
'node onSerialize shouldn\'t return anything, data should be stored in the object pass in the first parameter'
|
||||
)
|
||||
|
||||
return o
|
||||
@@ -2351,7 +2351,7 @@ export class LGraphNode
|
||||
|
||||
/**
|
||||
* returns the output (or input) slot with a given type, -1 if not found
|
||||
* @param input uise inputs instead of outputs
|
||||
* @param input use inputs instead of outputs
|
||||
* @param type the type of the slot to find
|
||||
* @param returnObj if the obj itself wanted
|
||||
* @param preferFreeSlot if we want a free slot (if not found, will return the first of the type anyway)
|
||||
@@ -2911,7 +2911,7 @@ export class LGraphNode
|
||||
const fromLastFloatingReroute =
|
||||
parentReroute?.floating?.slotType === 'output'
|
||||
|
||||
// Adding from an ouput, or a floating reroute that is NOT the tip of an existing floating chain
|
||||
// Adding from an output, or a floating reroute that is NOT the tip of an existing floating chain
|
||||
if (afterRerouteId == null || !fromLastFloatingReroute) {
|
||||
const link = new LLink(
|
||||
-1,
|
||||
|
||||
@@ -241,10 +241,10 @@ export class LiteGraphGlobal {
|
||||
*/
|
||||
do_add_triggers_slots = false
|
||||
|
||||
/** [false!] being events, it is strongly reccomended to use them sequentially, one by one */
|
||||
/** [false!] being events, it is strongly recommended to use them sequentially, one by one */
|
||||
allow_multi_output_for_events = true
|
||||
|
||||
/** [true!] allows to create and connect a ndoe clicking with the third button (wheel) */
|
||||
/** [true!] allows to create and connect a node clicking with the third button (wheel) */
|
||||
middle_click_slot_add_default_node = false
|
||||
|
||||
/** [true!] dragging a link to empty space will open a menu, add from list, search or defaults */
|
||||
@@ -428,7 +428,7 @@ export class LiteGraphGlobal {
|
||||
`LiteGraph node class ${type} has onPropertyChange method, it must be called onPropertyChanged with d at the end`
|
||||
)
|
||||
|
||||
// TODO one would want to know input and ouput :: this would allow through registerNodeAndSlotType to get all the slots types
|
||||
// TODO one would want to know input and output :: this would allow through registerNodeAndSlotType to get all the slots types
|
||||
if (this.auto_load_slot_types) new base_class(base_class.title || 'tmpnode')
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
|
||||
#id: ExecutionId
|
||||
|
||||
/**
|
||||
* The path to the acutal node through subgraph instances, represented as a list of all subgraph node IDs (instances),
|
||||
* The path to the actual node through subgraph instances, represented as a list of all subgraph node IDs (instances),
|
||||
* followed by the actual original node ID within the subgraph. Each segment is separated by `:`.
|
||||
*
|
||||
* e.g. `1:2:3`:
|
||||
@@ -104,7 +104,7 @@ export class ExecutableNodeDTO implements ExecutableLGraphNode {
|
||||
readonly subgraphNodePath: readonly NodeId[],
|
||||
/** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
|
||||
readonly nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
|
||||
/** The actual subgraph instance that contains this node, otherise undefined. */
|
||||
/** The actual subgraph instance that contains this node, otherwise undefined. */
|
||||
readonly subgraphNode?: SubgraphNode
|
||||
) {
|
||||
if (!node.graph) throw new NullGraphError()
|
||||
|
||||
@@ -157,7 +157,7 @@ export interface SubgraphIO extends SubgraphIOShared {
|
||||
id: UUID
|
||||
/** The data type this slot uses. Unlike nodes, this does not support legacy numeric types. */
|
||||
type: string
|
||||
/** Links connected to this slot, or `undefined` if not connected. An ouptut slot should only ever have one link. */
|
||||
/** Links connected to this slot, or `undefined` if not connected. An output slot should only ever have one link. */
|
||||
linkIds?: LinkId[]
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('SubgraphConversion', () => {
|
||||
expect(graph.nodes.length).toBe(2)
|
||||
expect(graph.links.size).toBe(1)
|
||||
})
|
||||
it('Should merge boundry links', () => {
|
||||
it('Should merge boundary links', () => {
|
||||
const subgraph = createTestSubgraph({
|
||||
inputs: [{ name: 'value', type: 'number' }],
|
||||
outputs: [{ name: 'value', type: 'number' }]
|
||||
|
||||
@@ -134,7 +134,7 @@ describe('SubgraphSlot visual feedback', () => {
|
||||
expect(globalAlphaValues).toContain(0.4)
|
||||
})
|
||||
|
||||
// "not implmeneted yet"
|
||||
// "not implemented yet"
|
||||
// it("should render slots with full opacity when dragging between compatible SubgraphInput and SubgraphOutput", () => {
|
||||
// const subgraph = createTestSubgraph()
|
||||
|
||||
|
||||
@@ -986,7 +986,7 @@ export const CORE_SETTINGS: SettingParams[] = [
|
||||
name: 'Auto Save',
|
||||
type: 'combo',
|
||||
options: ['off', 'after delay'], // Room for other options like on focus change, tab change, window change
|
||||
defaultValue: 'off', // Popular requst by users (https://github.com/Comfy-Org/ComfyUI_frontend/issues/1584#issuecomment-2536610154)
|
||||
defaultValue: 'off', // Popular request by users (https://github.com/Comfy-Org/ComfyUI_frontend/issues/1584#issuecomment-2536610154)
|
||||
versionAdded: '1.16.0'
|
||||
},
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ defineExpose({
|
||||
bottom: calc(
|
||||
var(--sidebar-width) * 2 + var(--sidebar-icon-size) / 2 -
|
||||
var(--whats-new-popup-bottom)
|
||||
); /* Position to center of help center icon (2 icons below + half icon height for center - whats new popup bottom position ) */
|
||||
); /* Position to center of help center icon (2 icons below + half icon height for center - what's new popup bottom position ) */
|
||||
}
|
||||
|
||||
/* Sidebar positioning classes applied by parent */
|
||||
|
||||
@@ -219,7 +219,7 @@ const zSubgraphIO = zNodeInput.extend({
|
||||
id: z.string().uuid(),
|
||||
/** The data type this slot uses. Unlike nodes, this does not support legacy numeric types. */
|
||||
type: z.string(),
|
||||
/** Links connected to this slot, or `undefined` if not connected. An ouptut slot should only ever have one link. */
|
||||
/** Links connected to this slot, or `undefined` if not connected. An output slot should only ever have one link. */
|
||||
linkIds: z.array(z.number()).optional()
|
||||
})
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ import { cn } from '@/utils/tailwindUtil'
|
||||
*
|
||||
*
|
||||
* IMPORTANT: this escape is needed for many reason due to primevue's directive tooltip system.
|
||||
* We cannot use PT to conditonally render the tooltips because the entire PT object only run
|
||||
* once during the intialization of the directive not every mount/unmount.
|
||||
* We cannot use PT to conditionally render the tooltips because the entire PT object only run
|
||||
* once during the initialization of the directive not every mount/unmount.
|
||||
* Once the directive is constructed its no longer reactive in the traditional sense.
|
||||
* We have to use something non destructive like mouseevents to dismiss the tooltip.
|
||||
*
|
||||
|
||||
@@ -106,7 +106,7 @@ export const useImageUploadWidget = () => {
|
||||
}
|
||||
|
||||
// On load if we have a value then render the image
|
||||
// The value isnt set immediately so we need to wait a moment
|
||||
// The value isn't set immediately so we need to wait a moment
|
||||
// No change callbacks seem to be fired on initial setting of the value
|
||||
requestAnimationFrame(() => {
|
||||
nodeOutputStore.setNodeOutputs(node, fileComboWidget.value, {
|
||||
|
||||
@@ -524,7 +524,7 @@ export class ComfyApi extends EventTarget {
|
||||
if (msg.data.sid) {
|
||||
const clientId = msg.data.sid
|
||||
this.clientId = clientId
|
||||
window.name = clientId // use window name so it isnt reused when duplicating tabs
|
||||
window.name = clientId // use window name so it isn't reused when duplicating tabs
|
||||
sessionStorage.setItem('clientId', clientId) // store in session storage so duplicate tab can load correct workflow
|
||||
}
|
||||
this.dispatchCustomEvent('status', msg.data.status ?? null)
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface ElectronDownload
|
||||
status?: DownloadStatus
|
||||
}
|
||||
|
||||
/** Electron donwloads store handler */
|
||||
/** Electron downloads store handler */
|
||||
export const useElectronDownloadStore = defineStore('downloads', () => {
|
||||
const downloads = ref<ElectronDownload[]>([])
|
||||
const { DownloadManager } = electronAPI()
|
||||
|
||||
@@ -18,7 +18,7 @@ export class ExecutableGroupNodeChildDTO extends ExecutableNodeDTO {
|
||||
subgraphNodePath: readonly NodeId[],
|
||||
/** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
|
||||
nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
|
||||
/** The actual subgraph instance that contains this node, otherise undefined. */
|
||||
/** The actual subgraph instance that contains this node, otherwise undefined. */
|
||||
subgraphNode?: SubgraphNode | undefined,
|
||||
groupNodeHandler?: GroupNodeHandler
|
||||
) {
|
||||
|
||||
@@ -70,7 +70,7 @@ function extendLink(link: SerialisedLLinkArray) {
|
||||
* makes logical sense. Can apply fixes when passed the `fix` argument as true.
|
||||
*
|
||||
* Note that fixes are a best-effort attempt. Seems to get it correct in most cases, but there is a
|
||||
* chance it correct an anomoly that results in placing an incorrect link (say, if there were two
|
||||
* chance it correct an anomaly that results in placing an incorrect link (say, if there were two
|
||||
* links in the data). Users should take care to not overwrite work until manually checking the
|
||||
* result.
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ export function applyTextReplacements(
|
||||
let nodes = allNodes.filter(
|
||||
(n) => n.properties?.['Node name for S&R'] === split[0]
|
||||
)
|
||||
// If we cant, see if there is a node with that title
|
||||
// If we can't, see if there is a node with that title
|
||||
if (!nodes.length) {
|
||||
nodes = allNodes.filter((n) => n.title === split[0])
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ describe.skip('SubgraphConversion', () => {
|
||||
expect(graph.nodes.length).toBe(2)
|
||||
expect(graph.links.size).toBe(1)
|
||||
})
|
||||
it('Should merge boundry links', () => {
|
||||
it('Should merge boundary links', () => {
|
||||
const subgraph = createTestSubgraph({
|
||||
inputs: [{ name: 'value', type: 'number' }],
|
||||
outputs: [{ name: 'value', type: 'number' }]
|
||||
|
||||
@@ -135,7 +135,7 @@ describe.skip('SubgraphSlot visual feedback', () => {
|
||||
expect(globalAlphaValues).toContain(0.4)
|
||||
})
|
||||
|
||||
// "not implmeneted yet"
|
||||
// "not implemented yet"
|
||||
// it("should render slots with full opacity when dragging between compatible SubgraphInput and SubgraphOutput", () => {
|
||||
// const subgraph = createTestSubgraph()
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('Subgraph proxyWidgets', () => {
|
||||
expect(innerNodes[0].widgets[0].last_y).toBe(11)
|
||||
expect(innerNodes[0].widgets[0].computedHeight).toBe(12)
|
||||
})
|
||||
test('Can detatch and re-attach widgets', () => {
|
||||
test('Can detach and re-attach widgets', () => {
|
||||
const [subgraphNode, innerNodes] = setupSubgraph(1)
|
||||
innerNodes[0].addWidget('text', 'stringWidget', 'value', () => {})
|
||||
subgraphNode.properties.proxyWidgets = JSON.stringify([
|
||||
|
||||
Reference in New Issue
Block a user