Skip to content

✨ Add width prop to toast#2172

Merged
AbsolutelyHaakon merged 5 commits intomainfrom
toast-width
Apr 7, 2026
Merged

✨ Add width prop to toast#2172
AbsolutelyHaakon merged 5 commits intomainfrom
toast-width

Conversation

@AbsolutelyHaakon
Copy link
Copy Markdown
Contributor

@AbsolutelyHaakon AbsolutelyHaakon commented Apr 7, 2026

Background

The new Consents & Reservations page design feature long texts in the toasts which would be prettier if a width parameter could be specified for the toasts. See the design in figma here

Solution

  • Added BoxProps width prop to Toast similar to how the DatePicker has implemented it
    • Now allows for common width props including: "sm/md/xl", "fit-content", px values

Once approved, i will add the correct documentation to the design manual

General Checklist

  • I have updated documentation if necessary
  • I have verified the design aligns with the latest Figma sketches.
  • I have created a changeset if publishing is required

Accessibility checklist

For changes impacting the user interface or functionality, ensure the following:

  • It is possible to enlarge the text 400% without losing functionality
  • It works on both mobile and desktop
  • It works in both Chrome, Safari and Firefox
  • It works with VoiceOver

Demonstration

toastwidth.mov

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

🦋 Changeset detected

Latest commit: d77f114

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vygruppen/spor-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Terraform Plan for Stage 🔍

Show Plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.app.module.ssr_task.aws_ecs_task_definition.task[0] must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
      ~ arn                      = "arn:aws:ecs:eu-west-1:339713113237:task-definition/digitalekanaler-designmanual:203" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-west-1:339713113237:task-definition/digitalekanaler-designmanual" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ image            = "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:ce9b9f129930abf6d88aeaa8108cb4cc014f4570" -> "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:60ca1d9140c3c83bfed6b53a4fde610275304616"
                    name             = "digitalekanaler-designmanual-main"
                    # (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "digitalekanaler-designmanual" -> (known after apply)
      ~ revision                 = 203 -> (known after apply)
      - tags                     = {} -> null
        # (13 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Warning: Redundant ignore_changes element

  on .terraform/modules/app.preview_url/main.tf line 111, in resource "aws_lambda_function" "lambda_function":
 111: resource "aws_lambda_function" "lambda_function" {

Adding an attribute name to ignore_changes tells Terraform to ignore future
changes to the argument in configuration after the object has been created,
retaining the value originally configured.

The attribute qualified_arn is decided by the provider alone and therefore
there can be no configured value to compare with. Including this attribute in
ignore_changes has no effect. Remove the attribute from ignore_changes to
quiet this warning.

(and 2 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

For commit 3d8dc9f
Plan generated at: 2026-04-07 10:23:55 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Terraform Plan for Test 🔍

Show Plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.app.module.ssr_task.aws_ecs_task_definition.task[0] must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
      ~ arn                      = "arn:aws:ecs:eu-west-1:590183702222:task-definition/digitalekanaler-designmanual:218" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-west-1:590183702222:task-definition/digitalekanaler-designmanual" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ image            = "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:ce9b9f129930abf6d88aeaa8108cb4cc014f4570" -> "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:60ca1d9140c3c83bfed6b53a4fde610275304616"
                    name             = "digitalekanaler-designmanual-main"
                    # (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "digitalekanaler-designmanual" -> (known after apply)
      ~ revision                 = 218 -> (known after apply)
      - tags                     = {} -> null
        # (13 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Warning: Redundant ignore_changes element

  on .terraform/modules/app.preview_url/main.tf line 111, in resource "aws_lambda_function" "lambda_function":
 111: resource "aws_lambda_function" "lambda_function" {

Adding an attribute name to ignore_changes tells Terraform to ignore future
changes to the argument in configuration after the object has been created,
retaining the value originally configured.

The attribute qualified_arn is decided by the provider alone and therefore
there can be no configured value to compare with. Including this attribute in
ignore_changes has no effect. Remove the attribute from ignore_changes to
quiet this warning.

(and 2 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

For commit 3d8dc9f
Plan generated at: 2026-04-07 10:23:59 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Terraform Plan for Stage 🔍

Show Plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.app.module.ssr_task.aws_ecs_task_definition.task[0] must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
      ~ arn                      = "arn:aws:ecs:eu-west-1:339713113237:task-definition/digitalekanaler-designmanual:203" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-west-1:339713113237:task-definition/digitalekanaler-designmanual" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ image            = "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:ce9b9f129930abf6d88aeaa8108cb4cc014f4570" -> "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:60ca1d9140c3c83bfed6b53a4fde610275304616"
                    name             = "digitalekanaler-designmanual-main"
                    # (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "digitalekanaler-designmanual" -> (known after apply)
      ~ revision                 = 203 -> (known after apply)
      - tags                     = {} -> null
        # (13 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Warning: Redundant ignore_changes element

  on .terraform/modules/app.preview_url/main.tf line 111, in resource "aws_lambda_function" "lambda_function":
 111: resource "aws_lambda_function" "lambda_function" {

Adding an attribute name to ignore_changes tells Terraform to ignore future
changes to the argument in configuration after the object has been created,
retaining the value originally configured.

The attribute qualified_arn is decided by the provider alone and therefore
there can be no configured value to compare with. Including this attribute in
ignore_changes has no effect. Remove the attribute from ignore_changes to
quiet this warning.

(and 2 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

For commit 8d1d49d
Plan generated at: 2026-04-07 10:25:01 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Terraform Plan for Test 🔍

Show Plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.app.module.ssr_task.aws_ecs_task_definition.task[0] must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
      ~ arn                      = "arn:aws:ecs:eu-west-1:590183702222:task-definition/digitalekanaler-designmanual:219" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-west-1:590183702222:task-definition/digitalekanaler-designmanual" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ image            = "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:58aa240fd1f6dfdc59d7dcd31dc17556e2ce4da4" -> "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:ce9b9f129930abf6d88aeaa8108cb4cc014f4570"
                    name             = "digitalekanaler-designmanual-main"
                    # (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "digitalekanaler-designmanual" -> (known after apply)
      ~ revision                 = 219 -> (known after apply)
      - tags                     = {} -> null
        # (13 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Warning: Redundant ignore_changes element

  on .terraform/modules/app.preview_url/main.tf line 111, in resource "aws_lambda_function" "lambda_function":
 111: resource "aws_lambda_function" "lambda_function" {

Adding an attribute name to ignore_changes tells Terraform to ignore future
changes to the argument in configuration after the object has been created,
retaining the value originally configured.

The attribute qualified_arn is decided by the provider alone and therefore
there can be no configured value to compare with. Including this attribute in
ignore_changes has no effect. Remove the attribute from ignore_changes to
quiet this warning.

(and 2 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

For commit 8d1d49d
Plan generated at: 2026-04-07 10:25:02 UTC

@AbsolutelyHaakon AbsolutelyHaakon marked this pull request as ready for review April 7, 2026 10:26
@AbsolutelyHaakon AbsolutelyHaakon requested a review from a team as a code owner April 7, 2026 10:26
Copy link
Copy Markdown
Collaborator

@Siljeelisestrm Siljeelisestrm left a comment

Choose a reason for hiding this comment

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

:)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Terraform Plan for Production 🔍

Show Plan
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.app.module.ssr_task.aws_ecs_task_definition.task[0] must be replaced
-/+ resource "aws_ecs_task_definition" "task" {
      ~ arn                      = "arn:aws:ecs:eu-west-1:471112960535:task-definition/digitalekanaler-designmanual:205" -> (known after apply)
      ~ arn_without_revision     = "arn:aws:ecs:eu-west-1:471112960535:task-definition/digitalekanaler-designmanual" -> (known after apply)
      ~ container_definitions    = jsonencode(
          ~ [
              ~ {
                  ~ image            = "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:ce9b9f129930abf6d88aeaa8108cb4cc014f4570" -> "637423315721.dkr.ecr.eu-west-1.amazonaws.com/designmanual:60ca1d9140c3c83bfed6b53a4fde610275304616"
                    name             = "digitalekanaler-designmanual-main"
                    # (8 unchanged attributes hidden)
                },
            ] # forces replacement
        )
      ~ enable_fault_injection   = false -> (known after apply)
      ~ id                       = "digitalekanaler-designmanual" -> (known after apply)
      ~ revision                 = 205 -> (known after apply)
      - tags                     = {} -> null
        # (13 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

Warning: Redundant ignore_changes element

  on .terraform/modules/app.preview_url/main.tf line 111, in resource "aws_lambda_function" "lambda_function":
 111: resource "aws_lambda_function" "lambda_function" {

Adding an attribute name to ignore_changes tells Terraform to ignore future
changes to the argument in configuration after the object has been created,
retaining the value originally configured.

The attribute qualified_arn is decided by the provider alone and therefore
there can be no configured value to compare with. Including this attribute in
ignore_changes has no effect. Remove the attribute from ignore_changes to
quiet this warning.

(and 2 more similar warnings elsewhere)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

For commit d77f114
Plan generated at: 2026-04-07 10:37:44 UTC

@AbsolutelyHaakon AbsolutelyHaakon merged commit bc4d10e into main Apr 7, 2026
8 checks passed
@AbsolutelyHaakon AbsolutelyHaakon deleted the toast-width branch April 7, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants