Skip to content

Commit 3916428

Browse files
committed
Performance setting default update
1 parent dbb712b commit 3916428

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

packages/adaptive-ui-designer-figma-plugin/src/figma/controller.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import type { PluginMessage} from "../core/messages.js";
44
import { FigmaPluginNode } from "./node.js";
55

66
export class FigmaController extends Controller {
7+
constructor() {
8+
super();
9+
10+
// Ignore invisible nodes for performance by default. There is a setting in the UI to toggle this.
11+
figma.skipInvisibleInstanceChildren = true;
12+
}
13+
714
public async getNode(id: string): Promise<FigmaPluginNode | null> {
815
const node = await figma.getNodeByIdAsync(id);
916
if (node) {

packages/adaptive-ui-designer-figma-plugin/src/figma/main.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import { FigmaController } from "./controller.js";
44

55
const controller = new FigmaController();
66

7-
// Ignore invisible nodes for performance, which means if someone turns them back to visible they may need to run the plugin again.
8-
// Update: With a reasonable number of invisible nodes the speed is no longer intolerable. Better to make sure styling is current.
9-
// figma.skipInvisibleInstanceChildren = true;
10-
117
figma.showUI(__html__, {
128
height: 600,
139
width: 356,

packages/adaptive-ui-designer-figma-plugin/src/ui/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ export class App extends FASTElement {
653653
}
654654

655655
@observable
656-
public skipInvisibleNodes: boolean = false;
656+
public skipInvisibleNodes: boolean = true;
657657
protected skipInvisibleNodesChanged(prev: boolean, next: boolean) {
658658
const message: SkipInvisibleNodesMessage = {
659659
type: "SKIP_INVISIBLE_NODES",

0 commit comments

Comments
 (0)