Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV - Write documentation requiring React components to have .jsx extension instead of .js #1823

Open
1 of 8 tasks
Tracked by #1768
aqandrew opened this issue Sep 10, 2024 · 1 comment
Open
1 of 8 tasks
Tracked by #1768
Assignees
Labels
Feature: Code Health Make our code more readable, testable, and modular Role: Frontend React front end work size: 0.25pt Can be done in 1.5 hours

Comments

@aqandrew
Copy link
Member

aqandrew commented Sep 10, 2024

Dependency

Overview

As a consequence of our Vite migration, we need to document the necessity for components to have .jsx file extensions

More Info

Traditionally, React components may be written in either .js or .jsx files. Our new build tool, Vite, requires that all files containing React components have the .jsx extension. This practice helps to prevent errors during Vite's static analysis of imported files.

Action Items

  • create new wiki page: "Vite Migration: Why Vite Components Require JSX Extensions"
    • make a note clearly stating that all new components must have .jsx extensions
      • (optional) copy the contents of the More Info section into the wiki page
    • summarize the relevant information provided by the links in Resources
    • copy the "Migrated Files" into a section in the wiki
    • add the links in this ticket's Resources into the wiki's Resources
  • comment the link to the newly published wiki page as a comment on this ticket

Resources/Instructions

Links for page's content

Migrated Files

### Migrated Component Files
- components/Map/index.jsx
- components/common/ChipList/index.jsx
- components/main/Desktop/CouncilSelector/index.jsx
- components/main/Desktop/FilterMenu.jsx
- components/main/Desktop/TypeSelector/index.jsx
- components/main/Desktop/index.jsx
@aqandrew aqandrew added Role: Frontend React front end work Milestone: X - Technical Debt Feature: Code Health Make our code more readable, testable, and modular draft and removed Role: Missing Milestone: Missing labels Sep 10, 2024
@github-project-automation github-project-automation bot moved this to New Issue Approval in P: 311: Project Board Sep 12, 2024
@ryanfchase ryanfchase added this to the X - Technical Debt milestone Sep 12, 2024
@ryanfchase ryanfchase added ready for dev lead ready for developer lead to review the issue and removed Milestone: X - Technical Debt labels Sep 12, 2024
@ryanfchase ryanfchase removed their assignment Oct 17, 2024
@ryanfchase ryanfchase added size: 0.25pt Can be done in 1.5 hours and removed Size: Missing draft labels Oct 17, 2024
@ryanfchase ryanfchase removed the ready for dev lead ready for developer lead to review the issue label Oct 18, 2024
@ryanfchase
Copy link
Member

Editing ticket's action items: let's have this documentation in a wiki page, and we can link this wiki page in the README

@ryanfchase ryanfchase moved this from New Issue Approval to Icebox (on hold) in P: 311: Project Board Oct 27, 2024
@ryanfchase ryanfchase added Dependency An issue that includes dependencies and removed Dependency An issue that includes dependencies labels Oct 27, 2024
@ryanfchase ryanfchase moved this from Icebox (on hold) to Prioritized Backlog in P: 311: Project Board Oct 31, 2024
@DrAcula27 DrAcula27 self-assigned this Nov 21, 2024
@DrAcula27 DrAcula27 moved this from Prioritized Backlog to In progress in P: 311: Project Board Jan 7, 2025
@traycn traycn changed the title write documentation requiring React components to have .jsx extension instead of .js DEV - Write documentation requiring React components to have .jsx extension instead of .js Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Code Health Make our code more readable, testable, and modular Role: Frontend React front end work size: 0.25pt Can be done in 1.5 hours
Projects
Status: In progress
Development

No branches or pull requests

3 participants