Skip to content

Commit

Permalink
Update documentation and strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmir committed Nov 11, 2024
1 parent 34af85d commit ed5dce9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lookbook/docs/patterns/05-dialogs.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ attributes to it:

- `tag: :a` so that the component is rendered as a link
- `href: link_to_dialog_path` to specify where to request the dialog stream from
- `data: { controller: "async-dialog" }` to attach the async-dialog controller to the button.
- `data: { controller: "async-dialog" }` to attach the async-dialog controller to the button (In some cases, depending on the underlying html structure, `content_arguments: { data: { controller: "async-dialog" }}` might be needed instead)

```erb
<%%= render(Primer::Beta::Button.new(
Expand Down Expand Up @@ -39,7 +39,7 @@ class TestController < ApplicationControler
end
```

For this to work, the `OpTurbo::Streamable` module needs to be included in the modal component:
For this to work, the `OpTurbo::Streamable` module needs to be included in the modal component, along with the `OpTurbo::DialogStreamHelper` module in the corresponding controller:

```ruby
class MyDialogComponent < ApplicationControler
Expand All @@ -66,7 +66,7 @@ Assuming the MyDialogComponent template looks like this:
%>
```

You can also render the dialog in a manual turbo_stream template
You can also render the dialog in a manual turbo_stream template:

```ruby
class TestController < ApplicationControler
Expand Down
1 change: 1 addition & 0 deletions lookbook/docs/patterns/11-sub-header.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This component is an own implementation for OpenProject requirements of contextu

- Restrict SubHeader actions to the page's content-specific actions (e.g. filtering or creating a new object).
- Use IconButtons instead of Buttons for actions only when the icon is clear enough to describe the action.
- When more actions are necessary, or if a menu is needed, use an ActionMenu instead of the ActionButtons.

**Don't**

Expand Down
2 changes: 1 addition & 1 deletion modules/meeting/app/forms/meeting/copy_attachments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Meeting::CopyAttachments < ApplicationForm
form do |meeting_form|
meeting_form.check_box(
name: "copy_attachments",
label: "Copy attachments",
label: I18n.t("meeting.copy.attachments"),
checked: false
)
end
Expand Down
2 changes: 1 addition & 1 deletion modules/meeting/app/forms/meeting/copy_items.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Meeting::CopyItems < ApplicationForm
form do |meeting_form|
meeting_form.check_box(
name: "copy_agenda",
label: "Copy agenda items",
label: I18n.t("meeting.copy.agenda_items"),
checked: true
)
end
Expand Down
2 changes: 1 addition & 1 deletion modules/meeting/app/forms/meeting/copy_participants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Meeting::CopyParticipants < ApplicationForm
form do |meeting_form|
meeting_form.check_box(
name: "copy_participants",
label: "Copy list of participants",
label: I18n.t("meeting.copy.participants"),
checked: true
)
end
Expand Down
4 changes: 2 additions & 2 deletions modules/meeting/app/forms/meeting/email_participants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class Meeting::EmailParticipants < ApplicationForm
form do |meeting_form|
meeting_form.check_box(
name: "send_notificationss",
label: "Email participants",
label: I18n.t("meeting.email.send_emails"),
checked: false,
caption: I18n.t("meeting.email.send_invitation_emails")
caption: I18n.t("meeting.email.send_invitation_emails_structured")
)
end
end
3 changes: 3 additions & 0 deletions modules/meeting/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,14 @@ en:
attachments: "Copy attachments"
attachments_text: "Copy over all attached files to the new meeting"
agenda: "Copy agenda"
agenda_items: "Copy agenda items"
agenda_text: "Copy the agenda of the old meeting"
participants: "Copy list of participants"
email:
send_emails: "Email participants"
send_invitation_emails: >
Send an email invitation immediately to the participants selected above. You can also do this manually at any time later.
send_invitation_emails_structured: "Send an email invitation immediately to all participants. You can also do this manually at any time later."
open_meeting_link: "Open meeting"
invited:
summary: "%{actor} has sent you an invitation for the meeting %{title}"
Expand Down

0 comments on commit ed5dce9

Please sign in to comment.