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 DangerConfirmationDialog internal components status #224

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class DangerConfirmationDialog
# This component is part of `Primer::OpenProject::DangerConfirmationDialog`
# and should not be used as a standalone component.
class ConfirmationCheckBox < Primer::Component
status :open_project

# @param check_box_id [String] The id of the check_box input.
# @param check_box_name [String] The name of the check_box input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module OpenProject
class DangerConfirmationDialog
# Utility component for wrapping DangerConfirmationDialog in a form
class FormWrapper < Primer::Component
status :open_project

def initialize(builder: nil, action: nil, **form_arguments)
raise ArgumentError, "Pass in either a :builder or :action argument, not both." if builder && action

Expand Down
67 changes: 67 additions & 0 deletions static/arguments.json
Original file line number Diff line number Diff line change
Expand Up @@ -5105,6 +5105,73 @@
}
]
},
{
"component": "OpenProject::DangerConfirmationDialog",
"status": "open_project",
"a11y_reviewed": false,
"short_name": "OpenProjectDangerConfirmationDialog",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/default/",
"parameters": [
{
"name": "form_arguments",
"type": "Hash",
"default": "`{}`",
"description": "Allows the dialog to submit a form. Pass EITHER the `builder:` option to this hash"
},
{
"name": "id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "The id of the dialog."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "OpenProject::DangerConfirmationDialog::ConfirmationCheckBox",
"status": "open_project",
"a11y_reviewed": false,
"short_name": "OpenProjectDangerConfirmationDialogConfirmationCheckBox",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/confirmation_check_box/default/",
"parameters": [
{
"name": "check_box_id",
"type": "String",
"default": "`self.class.generate_id`",
"description": "The id of the check_box input."
},
{
"name": "check_box_name",
"type": "String",
"default": "N/A",
"description": "The name of the check_box input."
},
{
"name": "system_arguments",
"type": "Hash",
"default": "N/A",
"description": "[System arguments](/system-arguments)"
}
]
},
{
"component": "OpenProject::DangerConfirmationDialog::FormWrapper",
"status": "open_project",
"a11y_reviewed": false,
"short_name": "OpenProjectDangerConfirmationDialogFormWrapper",
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb",
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/form_wrapper/default/",
"parameters": [

]
},
{
"component": "OpenProject::DragHandle",
"status": "open_project",
Expand Down
3 changes: 3 additions & 0 deletions static/audited_at.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
"Primer::Navigation::TabComponent": "",
"Primer::OpenProject::BorderGrid": "",
"Primer::OpenProject::BorderGrid::Cell": "",
"Primer::OpenProject::DangerConfirmationDialog": "",
"Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox": "",
"Primer::OpenProject::DangerConfirmationDialog::FormWrapper": "",
"Primer::OpenProject::DragHandle": "",
"Primer::OpenProject::FeedbackDialog": "",
"Primer::OpenProject::FeedbackMessage": "",
Expand Down
11 changes: 11 additions & 0 deletions static/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,17 @@
"Primer::OpenProject::BorderGrid::Cell": {
"GeneratedSlotMethods": "Primer::OpenProject::BorderGrid::Cell::GeneratedSlotMethods"
},
"Primer::OpenProject::DangerConfirmationDialog": {
"ConfirmationCheckBox": "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox",
"FormWrapper": "Primer::OpenProject::DangerConfirmationDialog::FormWrapper",
"GeneratedSlotMethods": "Primer::OpenProject::DangerConfirmationDialog::GeneratedSlotMethods"
},
"Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox": {
"GeneratedSlotMethods": "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox::GeneratedSlotMethods"
},
"Primer::OpenProject::DangerConfirmationDialog::FormWrapper": {
"GeneratedSlotMethods": "Primer::OpenProject::DangerConfirmationDialog::FormWrapper::GeneratedSlotMethods"
},
"Primer::OpenProject::DragHandle": {
"DEFAULT_SIZE": "small",
"GeneratedSlotMethods": "Primer::OpenProject::DragHandle::GeneratedSlotMethods",
Expand Down
5 changes: 5 additions & 0 deletions static/form_previews.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"name": "multi_text_field_form",
"snapshot": "true"
},
{
"preview_path": "primer/forms/custom_width_fields_form",
"name": "custom_width_fields_form",
"snapshot": "false"
},
{
"preview_path": "primer/forms/text_field_and_checkbox_form",
"name": "text_field_and_checkbox_form",
Expand Down
Loading
Loading