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

[desk-tool] Refactor file organization (chore) #1846

Merged
merged 1 commit into from Apr 22, 2020

Conversation

mariuslundgard
Copy link
Member

@mariuslundgard mariuslundgard commented Apr 21, 2020

Type of change (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (fix or update to documentation)
  • Maintenance
  • Other, please describe: Code/file reorganizationo

Does this change require a documentation update? (Check one)

  • Yes
  • No

Current behavior

n/a

Description

These changes include moving around React components and CSS files to fit into the following structure:

@sanity/
  desk-tool/
    src/
      components/
        # All React components that are used in multiple places (panes)
      panes/
        # The various distinct panes that can be rendered by the Desk tool
      tool/
        # The root React component for the Desk tool

Note for release

n/a

Checklist

  • I have read the Contributing Guidelines
  • The PR title is appropriately formatted: [some-package] PR title (#123)
  • The code is linted
  • The test suite is passing
  • Corresponding changes to the documentation have been made

@vercel
Copy link

vercel bot commented Apr 21, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/sanity-io/test-studio/aek25sact
✅ Preview: https://test-studio-git-desk-tool-organize-pane-directory-chore.sanity-io.now.sh

@mariuslundgard mariuslundgard force-pushed the desk-tool-organize-pane-directory-chore branch from 85ff1e7 to 591c3da Compare April 21, 2020 14:16
@mariuslundgard mariuslundgard changed the title [desk-tool] Refactor file organization [desk-tool] Refactor file organization (chore) Apr 21, 2020
Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Copy link
Contributor

@vicmeow vicmeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but isn't it nicer to keep CSS files in a styles folder so that the components folder doesn't get too cluttered/long?

@mariuslundgard mariuslundgard merged commit ac116c7 into next Apr 22, 2020
@mariuslundgard
Copy link
Member Author

isn't it nicer to keep CSS files in a styles folder so that the components folder doesn't get too cluttered/long?

@vicbergquist I changed that because I find it quicker to jump between the CSS file and the JS file if they are in the same directory. I consider both CSS and JS to be the component, so think it should be in one place. If components list gets too long, it can be divided into subfolders?

@vicmeow
Copy link
Contributor

vicmeow commented Apr 22, 2020

isn't it nicer to keep CSS files in a styles folder so that the components folder doesn't get too cluttered/long?

@vicbergquist I changed that because I find it quicker to jump between the CSS file and the JS file if they are in the same directory. I consider both CSS and JS to be the component, so think it should be in one place. If components list gets too long, it can be divided into subfolders?

@mariuslundgard ok makes sense! 👍

@mariuslundgard
Copy link
Member Author

Good! If we later find that using styles directories was better, we can always go back. Or better yet – we are on styled-components by then :)

@mariuslundgard mariuslundgard deleted the desk-tool-organize-pane-directory-chore branch April 23, 2020 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants