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

feat: many additions for new table structure #425

Merged
merged 3 commits into from
Dec 25, 2023
Merged

Conversation

kiaking
Copy link
Member

@kiaking kiaking commented Dec 25, 2023

OK this includes a lot more changes than I expected but here it is.

  • Add :trail-icon option to <SButton>.
  • Add <SPagination> component.
  • Add <SControl> and its child components.
  • Add many utility css classes.

Here is how you would build table with this changes.

<SCard>
  <SCardBlock size="medium" class="s-px-12">
    <SControl>
      <SControlLeft>
        <SControlInputSearch class="s-max-w-320" :model-value="null" />
        <SControlButton type="outline" mode="mute" label="Reset filters" @click="resetFilters" />
      </SControlLeft>
      <SControlRight>
        <SControlButton mode="info" label="New item" />
      </SControlRight>
    </SControl>
  </SCardBlock>
  <SCardBlock>
    <STable class="table" :options="table" />
  </SCardBlock>
  <SCardBlock size="medium" class="s-px-12">
    <SControl>
      <SControlRight>
        <SControlPagination
          :total="orderedData.length"
          :page="1"
          :per-page="orderedData.length"
        />
      </SControlRight>
    </SControl>
  </SCardBlock>
</SCard>

Size of <SCardBlock>

While testing many scenarios, it was impossible to control the padding of the card block automatically. It depends on many factors.

So, the new :size on <SCardBlock> will only control the height of the block. And padding should be added using css utility classes, or just define any css (especially when you need responsive design).

Size of <SControl>

When used inside <SCardBlock>, <SControl> will automatically pickup the correct size.

Changes to <SCard>

Using <SControl>, we can build the same thing as <SCardHeader> and <SCardFooter>, so I think we can deprecated these.

Docs update

There are many deprecations, but I'm leaving the docs as is for now. Too many changes 🫠


Screenshot 2023-12-25 at 12 38 09

@kiaking kiaking added the enhancement New feature or request label Dec 25, 2023
@kiaking kiaking requested a review from brc-dd December 25, 2023 03:49
@kiaking kiaking self-assigned this Dec 25, 2023
Copy link

netlify bot commented Dec 25, 2023

Deploy Preview for sefirot-docs ready!

Name Link
🔨 Latest commit 3b57242
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-docs/deploys/6588fc643537890008033f25
😎 Deploy Preview https://deploy-preview-425--sefirot-docs.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.

Copy link

netlify bot commented Dec 25, 2023

Deploy Preview for sefirot-story ready!

Name Link
🔨 Latest commit 3b57242
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-story/deploys/6588fc6417ca1f0008b4e733
😎 Deploy Preview https://deploy-preview-425--sefirot-story.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.

@kiaking kiaking merged commit 6fc9c71 into main Dec 25, 2023
9 checks passed
@kiaking kiaking deleted the new-table-structure branch December 25, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants