Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add margins to pages#1217

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
presleyp merged 5 commits intomainfrommargins/presleyp/978
May 4, 2022
Merged

feat: add margins to pages#1217

presleyp merged 5 commits intomainfrommargins/presleyp/978
May 4, 2022

Conversation

presleyp
Copy link
Contributor

This makes our pages look better and should make it easier to keep styles consistent.Fixes#978.

  • Adds a reusable Margins component
  • Extracted a couple constants to reuse in places where it's too hard to make Margins work
  • Put Margins around our pages
  • While I was at it I swapped a lot of styled divs around our pages forStack

@presleyppresleyp self-assigned thisApr 29, 2022
@codecov
Copy link

codecovbot commentedApr 29, 2022
edited
Loading

Codecov Report

Merging#1217 (47caa7e) intomain (021e4cd) willincrease coverage by0.43%.
The diff coverage is73.07%.

@@            Coverage Diff             @@##             main    #1217      +/-   ##==========================================+ Coverage   65.65%   66.09%   +0.43%==========================================  Files         269      281      +12       Lines       17366    18400    +1034       Branches      164      216      +52     ==========================================+ Hits        11402    12161     +759- Misses       4772     4975     +203- Partials     1192     1264      +72
FlagCoverage Δ
unittest-go-macos-latest53.50% <ø> (+0.50%)⬆️
unittest-go-postgres-64.99% <ø> (+0.20%)⬆️
unittest-go-ubuntu-latest55.97% <ø> (+0.58%)⬆️
unittest-go-windows-202251.89% <ø> (-0.63%)⬇️
unittest-js70.99% <73.07%> (+2.11%)⬆️
Impacted FilesCoverage Δ
...components/PreferencesLayout/PreferencesLayout.tsx0.00% <0.00%> (ø)
...ges/OrganizationPage/TemplatePage/TemplatePage.tsx0.00% <0.00%> (ø)
site/src/pages/TemplatesPages/TemplatesPage.tsx0.00% <0.00%> (ø)
site/src/pages/WorkspacesPage/WorkspacesPage.tsx0.00% <0.00%> (ø)
site/src/components/FullPageForm/FullPageForm.tsx100.00% <100.00%> (ø)
site/src/components/Header/Header.tsx92.85% <100.00%> (+0.54%)⬆️
site/src/components/Margins/Margins.tsx100.00% <100.00%> (ø)
site/src/forms/CreateTemplateForm.tsx96.29% <100.00%> (+0.14%)⬆️
site/src/forms/CreateWorkspaceForm.tsx89.47% <100.00%> (+0.58%)⬆️
.../pages/UsersPage/CreateUserPage/CreateUserPage.tsx100.00% <100.00%> (ø)
... and74 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update021e4cd...47caa7e. Read thecomment docs.

@presleyppresleyp marked this pull request as ready for reviewApril 29, 2022 19:55
@presleyppresleyp requested a review froma team as acode ownerApril 29, 2022 19:55
Copy link
Contributor

@greyscaledgreyscaled left a comment

Choose a reason for hiding this comment

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

LGTM - comment is minor, looks like a style linter is erroring somewhere.

export const Margins: React.FC = ({ children }) => {
const styles = useStyles()
return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: It's not clear to me why we need an outer<div> here - do you know what problem this solves?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah, I don't totally understand it, but the content gets horizontally squished without it. My guess is that it's needed as a buffer between the content andStack.

@BrunoQuaresma
Copy link
Collaborator

I just would suggest renaming the component toContainer instead ofMargins if that makes sense. I think Container is more common in the component libraries.

@presleyp
Copy link
ContributorAuthor

@BrunoQuaresma good point but I wanted this to be specific so we can layer different kinds of containers.

@presleyppresleyp merged commit34b91fd intomainMay 4, 2022
@presleyppresleyp deleted the margins/presleyp/978 branchMay 4, 2022 15:36
@missknissmisskniss added this to theV2 Beta milestoneMay 15, 2022
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
* Add Margin, use constants* Change throughout* Add to a page, lint* Format
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@greyscaledgreyscaledgreyscaled approved these changes

Assignees

@presleyppresleyp

Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

Add margins to Header and page content
4 participants
@presleyp@BrunoQuaresma@greyscaled@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp