Unverified Commit e046954e authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[dev-tools] better description for restart server button (#80118)

Better reflect why this button is needed.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04A1276AGK/p1748977699699439?thread_ts=1748886481.971709&cid=C04A1276AGK)

---------
Co-authored-by: 's avatarZack Tanner <1939140+ztanner@users.noreply.github.com>
parent 0a87d752
...@@ -186,12 +186,14 @@ export function UserPreferences({ ...@@ -186,12 +186,14 @@ export function UserPreferences({
<div className="preference-header"> <div className="preference-header">
<label id="restart-dev-server">Restart Dev Server</label> <label id="restart-dev-server">Restart Dev Server</label>
<p className="preference-description"> <p className="preference-description">
Restart the dev server to rebuild your application. Restarts the development server without needing to leave the
browser.
</p> </p>
</div> </div>
<div className="preference-control"> <div className="preference-control">
<button <button
aria-describedby="restart-dev-server" aria-describedby="restart-dev-server"
title="Restarts the development server without needing to leave the browser."
name="restart-dev-server" name="restart-dev-server"
data-restart-dev-server data-restart-dev-server
className="action-button" className="action-button"
...@@ -208,13 +210,14 @@ export function UserPreferences({ ...@@ -208,13 +210,14 @@ export function UserPreferences({
<div className="preference-header"> <div className="preference-header">
<label id="reset-bundler-cache">Reset Bundler Cache</label> <label id="reset-bundler-cache">Reset Bundler Cache</label>
<p className="preference-description"> <p className="preference-description">
Reset the bundler cache to rebuild your application without Clears the bundler cache and restarts the dev server. Helpful if
cache. you are seeing stale errors or changes are not appearing.
</p> </p>
</div> </div>
<div className="preference-control"> <div className="preference-control">
<button <button
aria-describedby="reset-bundler-cache" aria-describedby="reset-bundler-cache"
title="Clears the bundler cache and restarts the dev server. Helpful if you are seeing stale errors or changes are not appearing."
name="reset-bundler-cache" name="reset-bundler-cache"
data-reset-bundler-cache data-reset-bundler-cache
className="action-button" className="action-button"
......
...@@ -48,7 +48,15 @@ export function RestartServerButton({ error }: { error: Error }) { ...@@ -48,7 +48,15 @@ export function RestartServerButton({ error }: { error: Error }) {
} }
return ( return (
<button className="restart-dev-server-button" onClick={handleClick}> <button
className="restart-dev-server-button"
onClick={handleClick}
title={
process.env.__NEXT_TURBOPACK_PERSISTENT_CACHE
? 'Clears the bundler cache and restarts the dev server. Helpful if you are seeing stale errors or changes are not appearing.'
: 'Restarts the development server without needing to leave the browser.'
}
>
<RefreshClockWise width={14} height={14} /> <RefreshClockWise width={14} height={14} />
Restart Dev Server Restart Dev Server
</button> </button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment