openedx / openedx/paragon

ensure all renamed `*Hook.tsx` files have the "renamed" note comment

Open
#3,396 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
140
Forks
100
Avg merge
1h 3m
Merged PRs (30d)
30

Description

In https://github.com/openedx/paragon/pull/3395#discussion_r1928782834 I noticed

useArrowKeyNavigationHook, useIndexOfLastVisibleChildHook, and useToggleHook all have variations of

// Note: this file was renamed from 'useIndexOfLastVisibleChild.tsx' to 'useIndexOfLastVisibleChildHook.tsx' to fix
// some bugs in the Gatsby www site, where Webpack was getting the .tsx and .mdx
// files confused. Renaming this file allows us to keep the URLs of the docs site
// unchanged.

at the top of the files. This file (useIsVisibleHook) and useWindowSizeHook were also renamed but do not have those.

Since I noticed that on the sync from release-22.x to release-23.x that felt like the wrong place to recommend the changes.

The best path forward here would be to ensure we those note comments are consistent in all the renamed files on the release-22.x branch - then those changes will make their way into release-23.x and next.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

On the release-22.x branch, inspect the renamed useArrowKeyNavigationHook.tsx, useIndexOfLastVisibleChildHook.tsx, useToggleHook.tsx, useIsVisibleHook.tsx, and useWindowSizeHook.tsx files and compare their top-of-file note comments. Add or align the renamed-file notes so all five consistently explain the original filename and the Gatsby/Webpack issue, then verify the changes can sync into release-23.x and next.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.