Skip to content

Commit e75521b

Browse files
committed
fix: Bugfiler and tier toggles
1 parent d0d83fe commit e75521b

File tree

3 files changed

+157
-139
lines changed

3 files changed

+157
-139
lines changed

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"chat.mcp.discovery.enabled": true,
2+
"chat.mcp.discovery.enabled": {
3+
"claude-desktop": true,
4+
"windsurf": true,
5+
"cursor-global": true,
6+
"cursor-workspace": true
7+
},
38
"editor.formatOnSave": true,
49
"editor.defaultFormatter": "esbenp.prettier-vscode",
510
"[javascript]": {

ui/job-view/headerbars/TierIndicator.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,19 @@ export default function TierIndicator(props) {
2020
? "Can't Toggle because least one tier must be selected at all times"
2121
: `Toggle tier ${tier} jobs`
2222
}
23-
variant={shownTiers.includes(tier) ? 'dark' : 'outline-dark'}
23+
variant="link"
2424
disabled={isOnlyTier}
2525
key={tier}
26+
style={{
27+
backgroundColor: shownTiers.includes(tier)
28+
? '#6c757d'
29+
: 'transparent',
30+
color: shownTiers.includes(tier) ? 'white' : '#6c757d',
31+
border: 'none',
32+
padding: '0.25rem 0.75rem',
33+
textDecoration: 'none',
34+
minWidth: '2rem',
35+
}}
2636
>
2737
{tier}
2838
</Button>

ui/shared/BugFiler.jsx

Lines changed: 140 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
faChevronCircleUp,
99
faSpinner,
1010
faExclamationTriangle,
11+
faTimes,
1112
} from '@fortawesome/free-solid-svg-icons';
1213

1314
import {
@@ -628,8 +629,16 @@ export class BugFilerClass extends React.Component {
628629
return (
629630
<div>
630631
<Modal show={isOpen} onHide={toggle} size="lg">
631-
<Modal.Header closeButton>
632+
<Modal.Header>
632633
<Modal.Title>Intermittent Bug Filer</Modal.Title>
634+
<button
635+
type="button"
636+
className="close"
637+
aria-label="Close"
638+
onClick={toggle}
639+
>
640+
<FontAwesomeIcon icon={faTimes} />
641+
</button>
633642
</Modal.Header>
634643
<Modal.Body>
635644
<form className="d-flex flex-column">
@@ -673,25 +682,21 @@ export class BugFilerClass extends React.Component {
673682
Searching {productSearch}
674683
</div>
675684
)}
676-
<Form.Group tag="fieldset" className="mt-1">
685+
<Form.Group tag="fieldset" className="mt-1 mb-3">
677686
{suggestedProducts.map((product) => (
678-
<div
679-
className="ml-4"
687+
<Form.Check
688+
// className="ml-4"
680689
key={`modalProductSuggestion${product}`}
681-
>
682-
<Form.Label>
683-
<Form.Control
684-
type="radio"
685-
value={product}
686-
checked={product === selectedProduct}
687-
onChange={(evt) =>
688-
this.setState({ selectedProduct: evt.target.value })
689-
}
690-
name="productGroup"
691-
/>
692-
{product}
693-
</Form.Label>
694-
</div>
690+
type="radio"
691+
id={`product-${product}`}
692+
label={product}
693+
value={product}
694+
checked={product === selectedProduct}
695+
onChange={(evt) =>
696+
this.setState({ selectedProduct: evt.target.value })
697+
}
698+
name="productGroup"
699+
/>
695700
))}
696701
</Form.Group>
697702
</div>
@@ -762,7 +767,7 @@ export class BugFilerClass extends React.Component {
762767
/>
763768
<span
764769
id="summaryLength"
765-
className={`ml-1 font-weight-bold lg ${
770+
className={`ml-1 font-weight-bold lg align-self-center ${
766771
summary.length > 255 ? 'text-danger' : 'text-success'
767772
}`}
768773
>
@@ -782,58 +787,58 @@ export class BugFilerClass extends React.Component {
782787
/>
783788
</span>
784789
)}
785-
<div className="ml-5 mt-2">
786-
<div>
787-
<Form.Label>
788-
<Form.Control
789-
type="checkbox"
790-
checked={checkedLogLinks.has('Parsed log')}
791-
onChange={() =>
792-
this.toggleCheckedLogLink('Parsed log', parsedLog)
793-
}
794-
/>
790+
<div className="ml-4 mt-2">
791+
<Form.Check
792+
className="mb-2"
793+
type="checkbox"
794+
id="parsed-log-checkbox"
795+
checked={checkedLogLinks.has('Parsed log')}
796+
onChange={() =>
797+
this.toggleCheckedLogLink('Parsed log', parsedLog)
798+
}
799+
label={
795800
<a
796801
target="_blank"
797802
rel="noopener noreferrer"
798803
href={parsedLog}
799804
>
800805
Include Parsed Log Link
801806
</a>
802-
</Form.Label>
803-
</div>
804-
<div>
805-
<Form.Label>
806-
<Form.Control
807-
type="checkbox"
808-
checked={checkedLogLinks.has('Full log')}
809-
onChange={() =>
810-
this.toggleCheckedLogLink('Full log', fullLog)
811-
}
812-
/>
807+
}
808+
/>
809+
<Form.Check
810+
className="mb-1"
811+
type="checkbox"
812+
id="full-log-checkbox"
813+
checked={checkedLogLinks.has('Full log')}
814+
onChange={() =>
815+
this.toggleCheckedLogLink('Full log', fullLog)
816+
}
817+
label={
813818
<a target="_blank" rel="noopener noreferrer" href={fullLog}>
814819
Include Full Log Link
815820
</a>
816-
</Form.Label>
817-
</div>
821+
}
822+
/>
818823
{!!reftestUrl && (
819-
<div>
820-
<Form.Label>
821-
<Form.Control
822-
type="checkbox"
823-
checked={checkedLogLinks.has('Reftest URL')}
824-
onChange={() =>
825-
this.toggleCheckedLogLink('Reftest URL', reftestUrl)
826-
}
827-
/>
824+
<Form.Check
825+
className="mb-1"
826+
type="checkbox"
827+
id="reftest-url-checkbox"
828+
checked={checkedLogLinks.has('Reftest URL')}
829+
onChange={() =>
830+
this.toggleCheckedLogLink('Reftest URL', reftestUrl)
831+
}
832+
label={
828833
<a
829834
target="_blank"
830835
rel="noopener noreferrer"
831836
href={reftestUrl}
832837
>
833838
Include Reftest Viewer Link
834839
</a>
835-
</Form.Label>
836-
</div>
840+
}
841+
/>
837842
)}
838843
</div>
839844
<div className="d-flex flex-column">
@@ -850,102 +855,100 @@ export class BugFilerClass extends React.Component {
850855
rows={5}
851856
/>
852857
</div>
853-
<div className="d-inline-flex mt-2 ml-5">
854-
<div className="mt-2">
855-
<Form.Label>
856-
<Form.Control
857-
onChange={() =>
858-
this.setState({ isIntermittent: !isIntermittent })
859-
}
860-
type="checkbox"
861-
checked={isIntermittent}
862-
/>
863-
This is an intermittent failure
864-
</Form.Label>
865-
</div>
866-
<div className="d-inline-flex ml-2">
867-
<Form.Control
868-
id="regressedBy"
869-
type="text"
870-
className="ml-1"
871-
onChange={(evt) =>
872-
this.setState({ regressedBy: evt.target.value })
873-
}
874-
placeholder="Regressed by"
875-
/>
876-
<Tooltip
877-
target="regressedBy"
878-
placement="bottom"
879-
isOpen={tooltipOpen.regressedBy}
880-
toggle={() => this.toggleTooltip('regressedBy')}
881-
>
882-
Comma-separated list of bugs
883-
</Tooltip>
884-
<Form.Control
885-
id="seeAlso"
886-
className="ml-1"
887-
type="text"
888-
onChange={(evt) =>
889-
this.setState({ seeAlso: evt.target.value })
890-
}
891-
placeholder="See also"
892-
/>
893-
<Tooltip
894-
target="seeAlso"
895-
placement="bottom"
896-
isOpen={tooltipOpen.seeAlso}
897-
toggle={() => this.toggleTooltip('seeAlso')}
898-
>
899-
Comma-separated list of bugs
900-
</Tooltip>
901-
</div>
902-
</div>
903-
<div className="d-inline-flex mt-2 ml-5">
904-
<Form.Label>
905-
<Form.Control
906-
id="securityIssue"
858+
<div className="ml-4">
859+
<div className="d-inline-flex mb-1">
860+
<Form.Check
861+
className="mt-2"
862+
type="checkbox"
863+
id="intermittent-checkbox"
864+
checked={isIntermittent}
907865
onChange={() =>
908-
this.setState({ isSecurityIssue: !isSecurityIssue })
866+
this.setState({ isIntermittent: !isIntermittent })
909867
}
910-
type="checkbox"
911-
checked={isSecurityIssue}
868+
label="This is an intermittent failure"
912869
/>
913-
Report this as a security issue
914-
</Form.Label>
915-
</div>
916-
{['autoland', 'mozilla-central', 'try'].includes(
917-
currentRepo.name,
918-
) && (
919-
<div className="d-inline-flex mt-2 ml-5">
920-
<Form.Label>
870+
<div className="d-inline-flex ml-2">
921871
<Form.Control
872+
id="regressedBy"
873+
type="text"
874+
className="ml-1"
875+
onChange={(evt) =>
876+
this.setState({ regressedBy: evt.target.value })
877+
}
878+
placeholder="Regressed by"
879+
/>
880+
<Tooltip
881+
target="regressedBy"
882+
placement="bottom"
883+
isOpen={tooltipOpen.regressedBy}
884+
toggle={() => this.toggleTooltip('regressedBy')}
885+
>
886+
Comma-separated list of bugs
887+
</Tooltip>
888+
<Form.Control
889+
id="seeAlso"
890+
className="ml-1"
891+
type="text"
892+
onChange={(evt) =>
893+
this.setState({ seeAlso: evt.target.value })
894+
}
895+
placeholder="See also"
896+
/>
897+
<Tooltip
898+
target="seeAlso"
899+
placement="bottom"
900+
isOpen={tooltipOpen.seeAlso}
901+
toggle={() => this.toggleTooltip('seeAlso')}
902+
>
903+
Comma-separated list of bugs
904+
</Tooltip>
905+
</div>
906+
</div>
907+
<Form.Check
908+
className="mb-2"
909+
type="checkbox"
910+
id="security-issue-checkbox"
911+
checked={isSecurityIssue}
912+
onChange={() =>
913+
this.setState({ isSecurityIssue: !isSecurityIssue })
914+
}
915+
label="Report this as a security issue"
916+
/>
917+
{['autoland', 'mozilla-central', 'try'].includes(
918+
currentRepo.name,
919+
) && (
920+
<div className="mb-2">
921+
<Form.Check
922922
type="checkbox"
923+
id="confirm-failure-checkbox"
923924
checked={launchConfirmFailure}
924925
onChange={() =>
925926
this.setState({
926927
launchConfirmFailure: !launchConfirmFailure,
927928
})
928929
}
930+
label="Launch the Confirm Failures task at bug submission"
929931
/>
930-
Launch the Confirm Failures task at bug submission
931-
</Form.Label>
932-
</div>
933-
)}
934-
{!!crashSignatures.length && (
935-
<div>
936-
<Form.Label htmlFor="signature-input">Signature:</Form.Label>
937-
<Form.Control
938-
as="textarea"
939-
id="signature-input"
940-
onChange={(evt) =>
941-
this.setState({ crashSignatures: evt.target.value })
942-
}
943-
maxLength="2048"
944-
readOnly
945-
value={crashSignatures.join('\n')}
946-
/>
947-
</div>
948-
)}
932+
</div>
933+
)}
934+
{!!crashSignatures.length && (
935+
<div>
936+
<Form.Label htmlFor="signature-input">
937+
Signature:
938+
</Form.Label>
939+
<Form.Control
940+
as="textarea"
941+
id="signature-input"
942+
onChange={(evt) =>
943+
this.setState({ crashSignatures: evt.target.value })
944+
}
945+
maxLength="2048"
946+
readOnly
947+
value={crashSignatures.join('\n')}
948+
/>
949+
</div>
950+
)}
951+
</div>
949952
</form>
950953
</Modal.Body>
951954
<Modal.Footer>

0 commit comments

Comments
 (0)