Skip to content

Commit

Permalink
Add flight icon to document types configuration (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreda authored Dec 5, 2023
1 parent d4234f1 commit 02da840
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configs/config.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ document_types {
document_type "RFC" {
long_name = "Request for Comments"
description = "Create a Request for Comments document to present a proposal to colleagues for their review and feedback."
flight_icon = "discussion-circle"
template = "1Oz_7FhaWxdFUDEzKCC5Cy58t57C4znmC_Qr80BORy1U"

more_info_link {
Expand Down Expand Up @@ -58,6 +59,7 @@ document_types {
document_type "PRD" {
long_name = "Product Requirements"
description = "Create a Product Requirements Document to summarize a problem statement and outline a phased approach to addressing the problem."
flight_icon = "target"
template = "1oS4q6IPDr3aMSTTk9UDdOnEcFwVWW9kT8ePCNqcg1P4"

more_info_link {
Expand All @@ -78,6 +80,7 @@ document_types {
// document_type "Memo" {
// long_name = "Memo"
// description = "Create a Memo document to share an idea or brief note with colleagues."
// flight_icon = "radio"
// template = "file-id-for-a-blank-doc"
// }
}
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/commands/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ func registerDocumentTypes(cfg config.Config, db *gorm.DB) error {
Name: d.Name,
LongName: d.LongName,
Description: d.Description,
FlightIcon: d.FlightIcon,
Checks: checksJSON,
CustomFields: cfs,
}
Expand Down
4 changes: 4 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ type DocumentType struct {
// colleagues for their review and feedback."
Description string `hcl:"description,optional" json:"description"`

// FlightIcon is the name of the Helios flight icon.
// From: https://helios.hashicorp.design/icons/library
FlightIcon string `hcl:"flight_icon,optional" json:"flightIcon"`

// Template is the Google file ID for the document template used for this
// document type.
Template string `hcl:"template"`
Expand Down
4 changes: 4 additions & 0 deletions pkg/models/document_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ type DocumentType struct {
// colleagues for their review and feedback."
Description string

// FlightIcon is the name of the Helios flight icon.
// From: https://helios.hashicorp.design/icons/library
FlightIcon string

// MoreInfoLinkText is the text for a "more info" link.
// Example: "When should I create an RFC?"
MoreInfoLinkText string
Expand Down

0 comments on commit 02da840

Please sign in to comment.