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

Reorganize layout and canvas folders #120

Merged
merged 9 commits into from
Aug 6, 2020
Merged

Conversation

taneliang
Copy link
Member

@taneliang taneliang commented Aug 6, 2020

Summary of changes:

  1. canvas folder:
    1. Renamed canvas folder to content-views, and inverted the views and the rest of the stuff in the old canvas folder. I think this makes more sense given that the canvas folder mainly stored views.
    2. Deleted dead canvas utils and inline those that are only used once. Moved the remaining positioning utils into a utils/positioning.ts file.
    3. Canvas constants:
      1. Kill almost all dead canvas constants. I didn't clear all canvas colors, and I also didn't remove LABEL_FONT_SIZE since we'll likely need it in Show React version #73.
      2. Inline computed constants.
      3. Renamed a few constants that had names that no longer corresponded to how they were actually used.
      4. Move constants used by HorizontalPanAndZoomView and VerticalScrollView into the layout folder.
  2. layout folder:
    1. Renamed layout folder to view-base.
    2. Move useCanvasInteraction into the new view-base folder.

The new view-base code no longer depends on any external code apart from react and memoize-one 🎉

Resolves #54.

May conflict with #113, but since that only changes 9 lines it'll be easy to rebase that onto this PR. The COLORS constants are now in src/content-views/constants.ts.

Unblocks work on tests.

Test Plan

  • yarn flow: no new errors
  • CI

@taneliang taneliang requested a review from kartikcho August 6, 2020 07:09
@vercel
Copy link

vercel bot commented Aug 6, 2020

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

🔍 Inspect: https://vercel.com/mlh-fellowship/scheduling-profiler-prototype/866deqj72
✅ Preview: https://scheduling-profiler-prototype-git-eliang-reorg-canvas.mlh-fellowship.vercel.app

@taneliang taneliang mentioned this pull request Aug 6, 2020
4 tasks
@taneliang taneliang merged commit 87eb3b3 into master Aug 6, 2020
@taneliang taneliang deleted the eliang/reorg-canvas branch August 6, 2020 14:07
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.

Migration to V2 data: cleanup
2 participants