Skip to content

Commit dcca53d

Browse files
authored
Update GHES deprecation instructions with correct search hiding approach (#56704)
1 parent ca9d36a commit dcca53d

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

src/ghes-releases/lib/deprecation-steps.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,30 @@ All previously archived content lives in its own repository. For example, GHES 3
6262

6363
1. Update all translation directories to the latest `main` branch.
6464

65-
1. Hide search component temporarily while scraping docs in `src/search/components/Search.tsx`, by adding the `visually-hidden` class to the `form` element:
65+
1. Hide search components temporarily while scraping docs by adding the `visually-hidden` class to the search components:
66+
67+
**In `src/search/components/input/SearchBarButton.tsx`**, wrap the return statement content:
6668

6769
```javascript
6870
return (
69-
<div data-testid="search">
70-
<div className="position-relative z-2">
71-
<form
72-
role="search"
73-
className="width-full d-flex visually-hidden"
71+
<div className="visually-hidden">
72+
{/* existing search button content */}
73+
</div>
74+
)
75+
```
76+
77+
**In `src/search/components/input/SearchOverlayContainer.tsx`**, wrap the return statement content:
78+
79+
```javascript
80+
if (isSearchOpen) {
81+
return (
82+
<div className="visually-hidden">
83+
<SearchOverlay
84+
// ... existing props
85+
/>
86+
</div>
87+
)
88+
}
7489
```
7590

7691
1. Ensure your build is up to date:
@@ -93,7 +108,7 @@ All previously archived content lives in its own repository. For example, GHES 3
93108
npm run deprecate-ghes-archive
94109
```
95110

96-
1. Revert changes to `src/search/components/Search.tsx`.
111+
1. Revert changes to `src/search/components/input/SearchBarButton.tsx` and `src/search/components/input/SearchOverlayContainer.tsx`.
97112

98113
1. Check in any change to `src/ghes-releases/lib/enterprise-dates.json`.
99114

@@ -158,7 +173,7 @@ All previously archived content lives in its own repository. For example, GHES 3
158173
1. Poke around several deprecated pages by navigating to `docs.github.com/enterprise/<DEPRECATED VERSION>`, and ensure that:
159174
- Stylesheets are working properly
160175
- Images are rendering properly
161-
- The search functionality was disabled
176+
- The search functionality was disabled during scraping
162177
- Look at any console errors to ensure that no new unexpected errors were introduced. You can look at previous errors by viewing a previously completed deprecation page.
163178
- You should see a banner on the top of every deprecated page with the date that the version was deprecated.
164179
- You should see a banner at the top of every page for the oldes currently supported version with the date that it will be deprecated in the ~3 months.

0 commit comments

Comments
 (0)