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

fix: automatically open new subform table column in edit mode #14268

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

Conversation

lassopicasso
Copy link
Contributor

@lassopicasso lassopicasso commented Dec 12, 2024

Description

When a user adds a new column to the subform table, it should automatically open in edit mode, eliminating the need for an additional click. The same behavior can be seen in Prosess page when adding "handling" for a task.

initially-open-edit-mode.mp4

Related Issue(s)

  • itself

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)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Dec 12, 2024
@lassopicasso lassopicasso changed the title initial open new column perf: initial open new column Dec 12, 2024
@lassopicasso lassopicasso added team/studio-domain2 skip-releasenotes Issues that do not make sense to list in our release notes labels Dec 12, 2024
@lassopicasso lassopicasso self-assigned this Dec 12, 2024
@lassopicasso lassopicasso changed the title perf: initial open new column perf: initial open new subform table column Dec 12, 2024
@lassopicasso lassopicasso changed the title perf: initial open new subform table column fix: initial open new subform table column Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.52%. Comparing base (2345ba1) to head (b947002).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14268   +/-   ##
=======================================
  Coverage   95.52%   95.52%           
=======================================
  Files        1829     1829           
  Lines       23775    23778    +3     
  Branches     2754     2754           
=======================================
+ Hits        22710    22714    +4     
  Misses        807      807           
+ Partials      258      257    -1     

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

@lassopicasso lassopicasso marked this pull request as ready for review December 12, 2024 10:18
@lassopicasso lassopicasso removed their assignment Dec 12, 2024
@lassopicasso lassopicasso changed the title fix: initial open new subform table column fix: automatically open new subform table column in edit mode Dec 12, 2024
@lassopicasso lassopicasso added the skip-documentation Issues where updating documentation is not relevant label Dec 12, 2024
@JamalAlabdullah JamalAlabdullah self-assigned this Dec 12, 2024
@@ -12,19 +12,21 @@ export type ColumnElementProps = {
layoutSetName: string;
tableColumn: TableColumn;
columnNumber: number;
initialOpenForEdit: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

What about changing the name to isColumnInitiallyEditable or isInitialOpenForEdit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thx! I will use one of your suggestions :)

@@ -111,6 +112,18 @@ describe('ColumnElement', () => {

expect(onDeleteColumnMock).toHaveBeenCalledTimes(1);
});

Copy link
Contributor

Choose a reason for hiding this comment

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

Here maybe we can add test or update this to test the scenario where the user clicks first on the button Legg til kolonne and check if the edit mode is showing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree! :) Nice suggestion!

Copy link
Contributor

@JamalAlabdullah JamalAlabdullah 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! It works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added-to-sprint area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. frontend skip-documentation Issues where updating documentation is not relevant 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-domain2
Projects
Status: 🔎 Review
Development

Successfully merging this pull request may close these issues.

2 participants