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

Add table component #79

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Add table component #79

merged 5 commits into from
Sep 13, 2024

Conversation

FelixTJDietrich
Copy link
Collaborator

@FelixTJDietrich FelixTJDietrich commented Sep 11, 2024

Motivation

Leaderboard + Playing around with Angular trying to avoid directives -> Directives is the way to go :'(

Description

Add table component without directives by using css display styles.

Screenshots

image

Checklist

General

  • PR title is clear and descriptive
  • PR description explains the purpose and changes
  • Code follows project coding standards
  • Self-review of the code has been done
  • Changes have been tested locally
  • Screenshots have been attached (if applicable)
  • Documentation has been updated (if applicable)

Client (if applicable)

  • UI changes look good on all screen sizes and browsers
  • No console errors or warnings
  • User experience and accessibility have been tested
  • Added Storybook stories for new components
  • Components follow design system guidelines (if applicable)

@github-actions github-actions bot added client feature size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 11, 2024
@FelixTJDietrich FelixTJDietrich changed the title add table component Add table component Sep 11, 2024
@FelixTJDietrich
Copy link
Collaborator Author

FelixTJDietrich commented Sep 11, 2024

Just as an experiment, I think we need to use directives and then the code will not be that cool.
E.g. something like this: (not currently implemented)

      <table app-table>
        <caption app-table-caption>A list of your recent invoices.</caption>
        <thead app-table-header>
          <tr app-table-row>
            <th app-table-head class="w-[100px]">Invoice</th>
            <th app-table-head>Status</th>
            <th app-table-head>Method</th>
            <th app-table-head class="text-right">Amount</th>
          </tr>
        </thead>
        <tbody app-table-body>
          @for (invoice of invoices; track invoice.invoice) {
            <tr app-table-row>
              <td app-table-cell class="font-medium">{{invoice.invoice}}</td>
              <td app-table-cell>{{invoice.paymentStatus}}</td>
              <td app-table-cell>{{invoice.paymentMethod}}</td>
              <td app-table-cell class="text-right">{{invoice.totalAmount}}</td>
            </tr>
          }
        </tbody>
        <tfoot app-table-footer>
          <tr app-table-row>
            <td app-table-cell colspan="3">Total</td>
            <td app-table-cell class="text-right">$2,500.00</td>
          </tr>
        </tfoot>
      </table>

@FelixTJDietrich FelixTJDietrich merged commit bafe553 into develop Sep 13, 2024
4 checks passed
@FelixTJDietrich FelixTJDietrich deleted the feature/table-component branch September 13, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client feature size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant