Skip to content

Commit 8215f9b

Browse files
authored
#124 accounting and implementation columns (#153)
* Adding Custom Tag component * Populating 'Accounting' & 'Implementation' columns in registry datatable * Updating datatable th styles * Adding filters for 'Accounting' & 'Implementation' columns in registry table * Updating submodules * footer responsive styles update
1 parent cbf5d0b commit 8215f9b

File tree

10 files changed

+281
-34
lines changed

10 files changed

+281
-34
lines changed

_data

_includes/head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@
4343

4444
<!-- Reusable UI components -->
4545
<script src="{{ '/assets/js/custom-select.js' | relative_url }}" defer></script>
46+
<script src="{{ '/assets/js/custom-tag.js' | relative_url }}" defer></script>
4647
</head>

assets/css/custom-tag.scss

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
---
3+
4+
.tag {
5+
width: fit-content;
6+
padding: 2px 12px;
7+
border-radius: 9999px;
8+
9+
color: #FFF;
10+
background: #2E2E2E;
11+
12+
display: flex;
13+
justify-content: center;
14+
align-items: center;
15+
gap: 6px;
16+
17+
.label {
18+
/* Body/XS/Medium */
19+
font-family: "Inter";
20+
font-size: 12px;
21+
font-style: normal;
22+
font-weight: 400;
23+
line-height: 16px;
24+
/* 133.333% */
25+
26+
text-transform: capitalize;
27+
text-wrap: nowrap;
28+
}
29+
30+
.material-symbols-rounded.icon {
31+
font-size: 12px;
32+
}
33+
34+
&.variant-neutral-800 {
35+
background: #3A3A3A;
36+
}
37+
38+
&.variant-neutral-700 {
39+
background: #5F5F5F;
40+
}
41+
42+
&.variant-neutral-600 {
43+
color: #181818;
44+
background: #A1A1A1;
45+
}
46+
47+
&.variant-neutral-500 {
48+
color: #181818;
49+
background: #DADADA;
50+
}
51+
52+
&.variant-neutral-400 {
53+
color: #181818;
54+
background: #E7E7E7;
55+
}
56+
}

assets/css/custom.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
@import url('sidebar.css'); /* Navigation sidebar component */
77
@import url('content.css'); /* Main content area and typography */
88
@import url('tables.css'); /* Data tables and table interactions */
9-
@import url('datatable-overrides.css'); /* Datatable overrides */
9+
@import url('datatable-overrides.css'); /* Datatable overrides */
1010
@import url('diagram.css'); /* Diagram component styling */
1111
@import url('visualizations.css'); /* Data visualizations */
1212
@import url('side-panel.css'); /* Right-side panel for deployment details */
1313
@import url('forms.css'); /* Form components and custom selects */
1414
@import url('custom-select.css'); /* Custom select */
15+
@import url('custom-tag.css'); /* Custom Tag styling */
1516
@import url('footer.css'); /* Footer component styling */
1617
@import url('bib-link.css'); /* Reusable UI components like bibliography tooltips */

assets/css/datatable-overrides.scss

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@ table.dataTable#deployments-table thead>tr>td {
1818
padding: 8px;
1919
}
2020

21+
table.dataTable#deployments-table thead>tr>th {
22+
&.sorting,
23+
&[has-searchpane="true"] {
24+
padding-right: 32px;
25+
26+
.filter-trigger {
27+
right: 14px;
28+
}
29+
}
30+
31+
&.sorting[has-searchpane="true"] {
32+
padding-right: 64px;
33+
34+
.filter-trigger {
35+
right: 28px;
36+
}
37+
}
38+
}
39+
2140
table.dataTable#deployments-table thead>tr>th.sorting,
2241
table.dataTable#deployments-table thead>tr>th.sorting_asc,
2342
table.dataTable#deployments-table thead>tr>th.sorting_desc,
@@ -28,7 +47,6 @@ table.dataTable#deployments-table thead>tr>td.sorting_asc,
2847
table.dataTable#deployments-table thead>tr>td.sorting_desc,
2948
table.dataTable#deployments-table thead>tr>td.sorting_asc_disabled,
3049
table.dataTable#deployments-table thead>tr>td.sorting_desc_disabled {
31-
padding-right: 64px;
3250

3351
&::before,
3452
&::after {
@@ -180,6 +198,20 @@ button.filter-trigger {
180198
display: none !important;
181199
}
182200

201+
table.dataTable#deployments-table thead>tr>th {
202+
.filters-popover-wrapper {
203+
left: 0;
204+
right: unset;
205+
}
206+
207+
&:last-child {
208+
.filters-popover-wrapper {
209+
right: 0;
210+
left: unset;
211+
}
212+
}
213+
}
214+
183215
.filters-popover-wrapper {
184216
min-width: 150px;
185217
width: 284px;
@@ -189,7 +221,6 @@ button.filter-trigger {
189221

190222
display: none;
191223
position: absolute;
192-
left: 0;
193224
top: calc(100% + 4px);
194225

195226
background: #fff;

assets/css/footer.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@
114114
/* Responsive Design */
115115
@media (max-width: 1024px) {
116116

117-
.site-footer-container {
118-
flex-direction: column;
119-
}
120-
121117
.footer-col-wrapper {
122118
grid-auto-flow: row;
123119
gap: 40px;
@@ -131,6 +127,10 @@
131127
/* Responsive Design */
132128
@media (max-width: 768px) {
133129

130+
.site-footer-container {
131+
flex-direction: column;
132+
}
133+
134134
.site-footer {
135135
padding-top: 1rem;
136136
margin-top: 2rem;

assets/css/tables.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@
6969
.privacy-loss-column { min-width: 175px; }
7070
.model-column { min-width: 70px }
7171
.accounting-column { min-width: 124px; }
72+
.accounting-cell,
73+
.implementation-cell {
74+
display: flex;
75+
flex-direction: column;
76+
gap: 8px;
77+
}
7278
.implementation-column { min-width: 124px; }
7379

7480
/* Table Rows */

assets/js/custom-tag.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Reusable CustomSelect component (vanilla JS)
2+
// Usage:
3+
// const cs = new CustomSelect(containerElement, 'label', 'className');
4+
// cs.onClose = () => { ... };
5+
// Supports optional close button if onClose is set.
6+
7+
(function (global) {
8+
class CustomTag {
9+
constructor (container, label = '', className = '') {
10+
if (!container) throw new Error('CustomTag: container required');
11+
if (!label) throw new Error('CustomTag: label required');
12+
13+
this.container = container;
14+
this.label = label;
15+
this.className = className;
16+
this.onClose = null;
17+
this._render();
18+
19+
if(this.onClose) {
20+
this._bind();
21+
}
22+
}
23+
_render() {
24+
this.container.innerHTML = `
25+
<div class="tag ${this.className}">
26+
<div class="label">
27+
<span>${this.label}</span>
28+
</div>
29+
${this.onClose ? `<i class="material-symbols-rounded icon close-button">close</i>` : ''}
30+
</div>`;
31+
this.closeButton = this.container.querySelector('.close-button');
32+
}
33+
_bind() {
34+
this.closeButton.addEventListener('click', () => this.close());
35+
}
36+
close() { this.onClose(); }
37+
}
38+
39+
CustomTag.variants = Object.freeze([
40+
'neutral-900',
41+
// 'neutral-800',
42+
'neutral-700',
43+
'neutral-600',
44+
'neutral-500',
45+
'neutral-400',
46+
]);
47+
48+
// Expose globally (do not overwrite if already defined to allow override)
49+
if (!global.CustomTag) global.CustomTag = CustomTag;
50+
})(window);

0 commit comments

Comments
 (0)