Skip to content

Commit

Permalink
Fix insights ui classes flickering (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
pijng authored Feb 24, 2025
1 parent 95bdebb commit a2a0269
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ info:
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.19.2
version: 1.19.3
externalDocs:
description: Find out more about spec
url: https://moonlogs.pages.dev
Expand Down
6 changes: 6 additions & 0 deletions web/src/features/insights-builder/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ sample({

export const $insightLogs = createStore<Log[]>([]);

sample({
clock: getLogsFx.pending,
fn: () => [],
target: $insightLogs,
});

sample({
source: $intl,
clock: getLogsFx.doneData,
Expand Down
5 changes: 1 addition & 4 deletions web/src/features/insights-builder/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ const InsightLogsTable = () => {
h("tbody", () => {
list($insightLogs, ({ store: log, key: $idx }) => {
const $classes = createStore("");
$classes.watch(console.log);
const touch = createEvent();
sample({
source: { schemas: $insightsSchemas, logs: $insightLogs, idx: $idx },
Expand Down Expand Up @@ -345,8 +346,4 @@ const logRowClasses = (schemas: InsightSchema[], logs: Log[], idx: number): stri
const classes = colorClasses.concat(baseRowClasses);

return classes.join(" ");

// const finalClasses = colors.map((colors) => baseRowClasses.concat(colors).join(" "));

// return [finalClasses];
};

0 comments on commit a2a0269

Please sign in to comment.