Skip to content

Commit 1cc26e3

Browse files
author
jacobbleakley-neo4j
committed
Added comments for styles naming convention
1 parent a9eb6c4 commit 1cc26e3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/extensions/actions/ActionsRuleCreationModal.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ export const NeoCustomReportActionsModal = ({
254254
const spanClass = 'n-align-middle ';
255255
const textInputClass = 'font-bold n-ml-2 n-mt-[1px] n-float-right n-w-full';
256256

257+
// Sets parameter value
257258
const getActionHelper = (rule, index, customization) => {
258259
if (customization == 'set variable') {
259260
return (
@@ -308,6 +309,8 @@ export const NeoCustomReportActionsModal = ({
308309
return undefined;
309310
};
310311

312+
// Naming convention: td2 = table data 2. Conditional styling was implemented for each table data depending on whether the chart type == bar or not.
313+
// Styling was then extracted into functions outside of the html components, hence the naming.
311314
const td2Styling = (type) => ({ width: type === 'bar' ? '15%' : '30%' });
312315
const td2DropdownClassname = (type) => `n-align-middle n-pr-1 ${type === 'bar' ? 'n-w-full' : 'n-w-2/5'}`;
313316
const td2Autocomplete = (type, index, rule) =>
@@ -386,7 +389,7 @@ export const NeoCustomReportActionsModal = ({
386389
<span className='n-font-bold'>&nbsp;ON</span>
387390
</td>
388391

389-
{/* <-- td2 -->*/}
392+
{/* <-- td2 (table data 2) -->*/}
390393

391394
<td style={td2Styling(type)}>
392395
<div style={{ border: '2px dashed grey' }} className='n-p-1'>
@@ -413,15 +416,15 @@ export const NeoCustomReportActionsModal = ({
413416
</div>
414417
</td>
415418

416-
{/* <-- td3 -->*/}
419+
{/* <-- td3 (table data 3) -->*/}
417420

418421
<td style={{ width: '6%' }} className='n-text-center'>
419422
<span style={{ fontWeight: 'bold', color: 'black', marginLeft: 5, marginRight: 5 }}>
420423
{!ruleTrigger.multiple ? 'SET' : 'APPEND'}
421424
</span>
422425
</td>
423426

424-
{/* <-- td4 -->*/}
427+
{/* <-- td4 (table data 4) -->*/}
425428

426429
<td style={td4Styling(type)}>
427430
<div style={{ border: '2px dashed grey' }} className='n-p-1'>
@@ -445,15 +448,15 @@ export const NeoCustomReportActionsModal = ({
445448
</div>
446449
</td>
447450

448-
{/* <-- td5 -->*/}
451+
{/* <-- td5 (table data 5) -->*/}
449452

450453
<td width='5%' className='n-text-center'>
451454
<span style={{ fontWeight: 'bold', color: 'black', marginLeft: 5, marginRight: 5 }}>
452455
{!ruleTrigger.multiple ? 'TO' : 'WITH'}
453456
</span>
454457
</td>
455458

456-
{/* <-- td6 -->*/}
459+
{/* <-- td6 (table data 6) -->*/}
457460

458461
<td style={td6Styling(type)}>
459462
<div style={{ border: '2px dashed grey' }} className='n-p-1'>

0 commit comments

Comments
 (0)