Exercise

Create message menus

Let's update your empty dashboard. You can add menus to your header using the dropdownMenu() function. One type of menu is the message menu, which can be created by adding type = "messages".

header <- dashboardHeader(
  dropdownMenu(type = "messages")
)

You are building a NASA themed app. So far, the application includes a message in the header drop down menu pointing viewers to where they can find out when the International Space Station can be seen overhead.

header <- dashboardHeader(
  dropdownMenu(
    type = "messages",
    messageItem(
        from = "Lucy",
        message = "You can view the International Space Station!",
        href = "https://spotthestation.nasa.gov/sightings/"
        )
    )
)

Add a second message using the messageItem() function to link viewers to the frequently asked questions: https://spotthestation.nasa.gov/faq.cfm

We've already defined an empty server function for you.

Instructions

100 XP
  • Add a second message to the dropdownMenu() using the messageItem() function.
    • Include the following message text "Learn more about the International Space Station" and link to the International Space Station FAQ: https://spotthestation.nasa.gov/faq.cfm.
  • Set the new header in the dashboardPage().
  • Rerun the shiny app with these updates.