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: Create basic input table component #13719

Merged
merged 5 commits into from
Oct 8, 2024
Merged

Conversation

TomasEng
Copy link
Contributor

@TomasEng TomasEng commented Oct 7, 2024

Description

Created a new component for tables that contain input fields. The component is built on StudioTable, but contains some additional compound components:

  • StudioInputTable.Cell.Textfield
  • StudioInputTable.Cell.Textarea
  • StudioInputTable.Cell.Button
  • StudioInputTable.Cell.Checkbox
  • StudioInputTable.HeaderCell.Checkbox

These components are meant to be used instead of plain cells where the cells are supposed to contain the given input element. The input components are defined in classes that extend a BaseInputCell class. The base class currently only contains a render method, but it will be extended in future pull requests with keyboard interaction functionality. This pattern will allow us to use the same functions across different components.

The following functionality is not included and will be added in follow-up pull requests:

  • Keyboard navigation between input elements
  • Auto-select of input content on focus
  • Auto-adjustment of textarea height
  • If necessary: change handlers on row and table level

Video

Spiller.inn.2024-10-07.124017.mp4

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@github-actions github-actions bot added solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Oct 7, 2024
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.45%. Comparing base (c76efd9) to head (cc970a0).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13719      +/-   ##
==========================================
+ Coverage   94.42%   94.45%   +0.02%     
==========================================
  Files        1582     1598      +16     
  Lines       21365    21478     +113     
  Branches     2549     2550       +1     
==========================================
+ Hits        20173    20286     +113     
  Misses        943      943              
  Partials      249      249              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TomasEng TomasEng changed the title Create basic input table component feat: Create basic input table component Oct 7, 2024
@TomasEng TomasEng marked this pull request as ready for review October 7, 2024 10:44
@Konrad-Simso Konrad-Simso self-assigned this Oct 7, 2024
Copy link
Contributor

@Konrad-Simso Konrad-Simso left a comment

Choose a reason for hiding this comment

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

Nice work! 😄 I just have 1 question, see commented file

@Konrad-Simso Konrad-Simso assigned TomasEng and unassigned Konrad-Simso Oct 8, 2024
@TomasEng
Copy link
Contributor Author

TomasEng commented Oct 8, 2024

I have now removed the unused file. I also made a minor CSS change to centralize the button in the button cell. In addition, I have made some small changes to the Cell components to make them conform to our className rule (className should always apply to the root element).

Copy link
Contributor

@Konrad-Simso Konrad-Simso left a comment

Choose a reason for hiding this comment

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

💯

@Konrad-Simso Konrad-Simso removed their assignment Oct 8, 2024
@TomasEng TomasEng added the skip-manual-testing PRs that do not need to be tested manually label Oct 8, 2024
@TomasEng
Copy link
Contributor Author

TomasEng commented Oct 8, 2024

Added the skip-manual-testing label since the component is not yet in use, and work is still in progress.

@TomasEng TomasEng merged commit 99d9790 into main Oct 8, 2024
10 checks passed
@TomasEng TomasEng deleted the grunnlag-inndatatabell branch October 8, 2024 09:24
@TomasEng TomasEng added the skip-releasenotes Issues that do not make sense to list in our release notes label Oct 10, 2024
@TomasEng TomasEng added the skip-documentation Issues where updating documentation is not relevant label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend skip-documentation Issues where updating documentation is not relevant skip-manual-testing PRs that do not need to be tested manually skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer Issues related to the Altinn Studio Designer solution. team/studio-domain1
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants