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

Mobile-first UI implementation with Semantic UI #20

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

aelishRollo
Copy link
Member

@aelishRollo aelishRollo commented Jun 6, 2024

Check it out. It is not yet data driven, but it's a simple layout that I think adheres fairly well to the layout you drew. It's mobile-first but looks decent on desktop as well. Would love to hear your thoughts.

https://deploy-preview-20--section-view.netlify.app

Fixes #18

Screenshots

Light mode

image image

Dark mode

image image

Copy link

netlify bot commented Jun 6, 2024

Deploy Preview for section-view ready!

Name Link
🔨 Latest commit f9636c6
🔍 Latest deploy log https://app.netlify.com/sites/section-view/deploys/668c61633324990008cf9251
😎 Deploy Preview https://deploy-preview-20--section-view.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mickmister
Copy link
Member

The project was failing to build based on an unused import. I fixed CI in commit 559a12f to make it so linting is skipped during build (because building has no business worrying about that). I also fixed the linting job to check linting correctly.

Here is the one linting issue that needs to be addressed:

[eslint] 
src/Foo.tsx
  Line 2:74:  'Input' is defined but never used  @typescript-eslint/no-unused-vars

Copy link
Member

@mickmister mickmister left a comment

Choose a reason for hiding this comment

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

Amazing work bro! In general LGTM 🚀

I have just a few comments around reorganizing the code and the favoring of editing & hooking into existing code rather than deleting if it's meant to still be used. I imagine the changes related to that were more for ease of development, but it's good to be conservative before removing existing code. No worries because Git allows us to track that easily. And since this isn't merged yet, it's totally fine to do what you did here.

Overall this is amazing!!! Nice work dude 🤫

src/App.tsx Outdated
sectionId={sectionId}
/>
);
const App = () => {
Copy link
Member

Choose a reason for hiding this comment

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

When building on top of existing code, it's important to iterate on the code that's already there. Deleting code like this (especially code written by someone else in the project) should be done carefully.

In this case, instead of deleting existing code here, I think we just need to change the pageContent variable from this:

section-view/src/App.tsx

Lines 53 to 58 in bc5af78

const pageContent = (
<SectionPage
projectId={projectId}
sectionId={sectionId}
/>
);

to this:

const pageContent = <Foo/>;

This is because with the changes in this PR, we are essentially swapping out the code that was SectionPage with Foo, so we want to do "only that" in the pull request's changes

src/Foo.tsx Outdated
</Menu>

{/* Chord Progression */}
<Header as='h3'>Progression: C Dm Em F</Header>
Copy link
Member

Choose a reason for hiding this comment

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

You can borrow code from https://github.com/jamtools/section-view/blob/main/src/SectionPage.tsx to fill calls to existing hooks to get this data. Should be super straightforward

Copy link
Member

Choose a reason for hiding this comment

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

Other code will obviously be relocated into existing component files like Files.tsx and Comments.tsx etc.

src/index.tsx Outdated
sectionId={sectionId}
client={localClient}
/>
<App />
Copy link
Member

Choose a reason for hiding this comment

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

This index.tsx file doesn't need to change for the purpose of this PR, besides adding the semantic-ui-css/semantic.min.css, which should probably be done in App.tsx anyway

@mickmister mickmister changed the title Mobile first refactor Mobile-first UI implementation with Semantic UI Jun 7, 2024
@mickmister
Copy link
Member

Also for PRs focused on UI work, it's always good to include screenshots in the PR description. Ideally before & after pictures, but just the "after" pictures is fine too

src/App.test.tsx Outdated
Copy link
Member

@mickmister mickmister Jun 7, 2024

Choose a reason for hiding this comment

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

FYI I think we should keep tests around, and maintain them to adapt to new code changes like this PR

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.

Implement mobile-first UI
2 participants