Skip to content

Commit 9366dc7

Browse files
committed
feat(devindex): Add Hireable and Website columns to Grid (#9152)
- Introduce generic Icon and IconLink components with full SCSS theme support - Implement 'hideMode: visibility' for icon columns to optimize grid scrolling (avoids DOM thrashing) - Add 'contain: layout paint style' to icons for rendering performance - Refactor DevIndex grid to use 'cellCls' and CSS variables for theme-aware styling - Add dark/light theme variables for new columns
1 parent 0d51b3d commit 9366dc7

13 files changed

Lines changed: 105 additions & 5 deletions

File tree

apps/devindex/view/home/GridContainer.mjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,25 +205,28 @@ class GridContainer extends BaseGridContainer {
205205
cellAlign: 'center'
206206
}, {
207207
type : 'iconLink',
208+
cellAlign: 'center',
208209
dataField: 'website',
209-
defaults : {style: {fontSize: '16px'}},
210+
cellCls : 'devindex-column-website',
210211
iconCls : 'fa fa-home',
211212
text : 'Website',
212-
width : 70
213+
width : 65
213214
}, {
214215
type : 'iconLink',
216+
cellAlign: 'center',
215217
dataField: 'linkedinUrl',
216-
defaults : {style: {color : '#0077b5', fontSize: '20px'}},
218+
cellCls : 'devindex-column-linkedin',
217219
iconCls : 'fa-brands fa-linkedin',
218220
text : 'LI',
219221
width : 40
220222
}, {
221223
type : 'icon',
224+
cellAlign: 'center',
222225
dataField: 'isHireable',
223-
defaults : {style: {color : '#28a745', fontSize: '16px'}},
226+
cellCls : 'devindex-column-hireable',
224227
iconCls : 'fas fa-circle-check',
225228
text : 'Hireable',
226-
width : 75
229+
width : 65
227230
}, {
228231
type : 'githubOrgs',
229232
dataField: 'organizations',

resources/scss/src/apps/devindex/home/GridContainer.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,37 @@
6565
font-weight : bold;
6666
text-shadow : var(--heatmap-shadow-3);
6767
}
68+
69+
&.devindex-column-website {
70+
.neo-icon-link {
71+
color : var(--devindex-website-color);
72+
font-size : 16px;
73+
transition: color 200ms ease-out;
74+
75+
&:hover {
76+
color: var(--devindex-website-hover-color);
77+
}
78+
}
79+
}
80+
81+
&.devindex-column-linkedin {
82+
.neo-icon-link {
83+
color : var(--devindex-linkedin-color);
84+
font-size : 20px;
85+
transition: color 200ms ease-out;
86+
87+
&:hover {
88+
color: var(--devindex-linkedin-hover-color);
89+
}
90+
}
91+
}
92+
93+
&.devindex-column-hireable {
94+
.neo-icon {
95+
color : var(--devindex-hireable-color);
96+
font-size: 16px;
97+
}
98+
}
6899
}
69100
}
70101
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.neo-icon {
2+
color : var(--icon-color);
3+
contain : layout paint style;
4+
font-size: var(--icon-font-size);
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.neo-icon-link {
2+
color : var(--icon-link-color);
3+
contain : layout paint style;
4+
font-size : var(--icon-link-font-size);
5+
text-decoration: var(--icon-link-text-decoration);
6+
7+
&:hover {
8+
color: var(--icon-link-hover-color);
9+
}
10+
}

resources/scss/theme-neo-dark/apps/devindex/home/GridContainer.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,13 @@
1313
--heatmap-bg-3: rgba(14, 233, 175, 0.65);
1414
--heatmap-text-3: #fff;
1515
--heatmap-shadow-3: 0 1px 2px rgba(0, 0, 0, 0.8);
16+
17+
--devindex-website-color : var(--purple-300);
18+
--devindex-website-hover-color: var(--purple-200);
19+
20+
--devindex-linkedin-color : #0077b5;
21+
--devindex-linkedin-hover-color: #298dcd;
22+
23+
--devindex-hireable-color: var(--green-500);
1624
}
1725
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:root .neo-theme-neo-dark {
2+
--icon-color : inherit;
3+
--icon-font-size: inherit;
4+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:root .neo-theme-neo-dark {
2+
--icon-link-color : var(--sem-color-text-primary-default);
3+
--icon-link-font-size : inherit;
4+
--icon-link-hover-color : var(--sem-color-fg-primary-highlighted);
5+
--icon-link-text-decoration: none;
6+
}

resources/scss/theme-neo-light/apps/devindex/home/GridContainer.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,13 @@
1313
--heatmap-bg-3: rgba(14, 233, 175, 0.65);
1414
--heatmap-text-3: #fff;
1515
--heatmap-shadow-3: 0 1px 2px rgba(0, 0, 0, 0.8);
16+
17+
--devindex-website-color : var(--purple-600);
18+
--devindex-website-hover-color: var(--purple-900);
19+
20+
--devindex-linkedin-color : #0077b5;
21+
--devindex-linkedin-hover-color: #005582;
22+
23+
--devindex-hireable-color: var(--green-600);
1624
}
1725
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:root .neo-theme-neo-light {
2+
--icon-color : inherit;
3+
--icon-font-size: inherit;
4+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:root .neo-theme-neo-light {
2+
--icon-link-color : var(--sem-color-text-primary-default);
3+
--icon-link-font-size : inherit;
4+
--icon-link-hover-color : var(--sem-color-fg-primary-highlighted);
5+
--icon-link-text-decoration: none;
6+
}

0 commit comments

Comments
 (0)