Skip to content

Commit 38ac69e

Browse files
guguclaude
andcommitted
fix: replace data-ph-no-capture attribute with ph-no-capture class
PostHog supports class-based no-capture which is more reliable than data attributes for preventing sensitive data capture in session replays. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 05f1971 commit 38ac69e

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

frontend/src/app/components/audit/info-dialog/info-dialog.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 mat-dialog-title>Log details</h1>
22
<mat-dialog-content>
3-
<p class="mat-body-1" data-block="preamble" data-ph-no-capture>
3+
<p class="mat-body-1 ph-no-capture" data-block="preamble">
44
{{ log.User }} {{ action }} in "{{ normalizedTableName }}" table on {{formattedCrreatedAt}} {{ log.Status }}.
55
</p>
66

@@ -10,10 +10,10 @@ <h1 mat-dialog-title>Log details</h1>
1010
class="mat-body"
1111
[ngClass]="{changed: isChangedFiled(field)}">
1212
<th>{{filedsNames[field]}}</th>
13-
<td data-ph-no-capture *ngIf="log.currentValue[field] !== '* * * sensitive data, no logs stored * * *'">
13+
<td class="ph-no-capture" *ngIf="log.currentValue[field] !== '* * * sensitive data, no logs stored * * *'">
1414
{{log.prevValue[field]}}
1515
</td>
16-
<td data-ph-no-capture
16+
<td class="ph-no-capture"
1717
[attr.colspan]="log.currentValue[field] === '* * * sensitive data, no logs stored * * *' ? '2' : '' "
1818
[ngClass]="{sensitive: log.currentValue[field] === '* * * sensitive data, no logs stored * * *'}">
1919
<div class="updated-cell">
@@ -35,7 +35,7 @@ <h1 mat-dialog-title>Log details</h1>
3535
class="mat-body"
3636
[ngClass]="{changed: isChangedFiled(field)}">
3737
<th>{{filedsNames[field.key]}}</th>
38-
<td data-ph-no-capture *ngIf="log.currentValue[field] !== '* * * sensitive data, no logs stored * * *'">
38+
<td class="ph-no-capture" *ngIf="log.currentValue[field] !== '* * * sensitive data, no logs stored * * *'">
3939
{{field.value}}
4040
</td>
4141
</tr>

frontend/src/app/components/charts/chart-edit/chart-edit.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h3>SQL Query</h3>
4747
{{ testing() ? 'Testing...' : 'Test Query' }}
4848
</button>
4949
</div>
50-
<div class="code-editor-box" data-ph-no-capture>
50+
<div class="code-editor-box ph-no-capture">
5151
<ngs-code-editor
5252
[theme]="codeEditorTheme"
5353
[codeModel]="codeModel()"

frontend/src/app/components/dashboard/db-table-view/db-table-row-view/db-table-row-view.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h2 class="mat-heading-2 row-preview-sidebar__title">Preview</h2>
8080
<ng-container *ngIf="selectedRow && selectedRow.record; else loadingContent">
8181
<div *ngFor="let column of columns; let i = index" class="row-preview-sidebar__field">
8282
<strong>{{column.normalizedTitle}}</strong>
83-
<div data-ph-no-capture class="row-preview-sidebar__value">
83+
<div class="row-preview-sidebar__value ph-no-capture">
8484
<ng-container *ngIf="isForeignKey(column.title); else recordContent">
8585
<app-foreign-key-record-view
8686
link="/dashboard/{{selectedRow.connectionID}}/{{selectedRow.foreignKeys[column.title]?.referenced_table_name}}/entry"

frontend/src/app/components/dashboard/db-table-view/db-table-view.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ <h2 class="mat-h2 table-name">{{ displayName }}</h2>
185185
</div>
186186

187187
<div *ngIf="getFiltersCount(activeFilters) !== 0 && !hasSavedFilterActive" class="active-filters">
188-
<mat-chip-row *ngFor="let activeFilter of activeFilters | keyvalue" data-ph-no-capture
189-
class="db-table-active-filter-chip"
188+
<mat-chip-row *ngFor="let activeFilter of activeFilters | keyvalue"
189+
class="db-table-active-filter-chip ph-no-capture"
190190
(removed)="removeFilter.emit(activeFilter.key)"
191191
(click)="handleActiveFilterClick(activeFilter.key)">
192192
{{ getFilter(activeFilter) }}
@@ -282,7 +282,7 @@ <h2 class="mat-h2 table-name">{{ displayName }}</h2>
282282
</button>
283283
</mat-menu>
284284
</mat-header-cell>
285-
<mat-cell *matCellDef="let element; let i = index" [attr.data-label]="tableData.dataNormalizedColumns[column]" class="db-table-cell" data-ph-no-capture>
285+
<mat-cell *matCellDef="let element; let i = index" [attr.data-label]="tableData.dataNormalizedColumns[column]" class="db-table-cell ph-no-capture">
286286
<div class="table-cell-content">
287287
<ng-container *ngIf="isForeignKey(column); else contentCell">
288288
<app-display-foreign-key

frontend/src/app/components/dashboard/db-table-view/saved-filters-panel/saved-filters-panel.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
</div>
180180
</form>
181181
<div class="static-filters" *ngIf="savedFilterMap[selectedFilterSetId]?.staticFilters?.length">
182-
<mat-chip *ngFor="let filter of savedFilterMap[selectedFilterSetId]?.staticFilters" class="static-filter-chip" data-ph-no-capture>
182+
<mat-chip *ngFor="let filter of savedFilterMap[selectedFilterSetId]?.staticFilters" class="static-filter-chip ph-no-capture">
183183
{{ getFilter(filter) }}
184184
</mat-chip>
185185
</div>

frontend/src/app/components/ui-components/record-edit-fields/code/code.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<span class="mat-body-1">{{ normalizedLabel }} {{ required ? '*' : '' }}</span>
22

3-
<div class="code-editor-box" data-ph-no-capture>
3+
<div class="code-editor-box ph-no-capture">
44
<ngs-code-editor
55
[theme]="codeEditorTheme"
66
[codeModel]="mutableCodeModel"

frontend/src/app/components/ui-components/record-edit-fields/json-editor/json-editor.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<span class="mat-body-1">{{ normalizedLabel }} {{ required ? '*' : '' }}</span>
22

3-
<div class="code-editor-box" data-ph-no-capture>
3+
<div class="code-editor-box ph-no-capture">
44
<ngs-code-editor
55
theme="vs"
66
[codeModel]="mutableCodeModel"

frontend/src/app/components/ui-components/record-edit-fields/markdown/markdown.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<span class="mat-body-1">{{ normalizedLabel }} {{ required ? '*' : '' }}</span>
22

3-
<div class="code-editor-box" data-ph-no-capture>
3+
<div class="code-editor-box ph-no-capture">
44
<ngs-code-editor
55
[theme]="codeEditorTheme"
66
[codeModel]="mutableCodeModel"

0 commit comments

Comments
 (0)