Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Notices: Add customization for background color, text color, and text position.#61338

Merged
RXminuS merged 14 commits into
mainfrom
bc/custom-notices-background-color
Apr 5, 2024
Merged

Notices: Add customization for background color, text color, and text position.#61338
RXminuS merged 14 commits into
mainfrom
bc/custom-notices-background-color

Conversation

@billCaplan

@billCaplan billCaplan commented Mar 22, 2024

Copy link
Copy Markdown

Closes #59751

  • Added variant option for Notices. Defaults to default option for position.
  • Added styleOverrides option to Notices with three fields:
    • backgroundColor
    • textColor
    • textCentered

This means in the site-config a user can now specify notices as:

{
"notices": [
    {
      "message": "THIS IS AN IMPORTANT NOTICE",
      "location": "top",
      "variant": "danger",
      "styleOverrides": {
        "backgroundColor": "#7f1d1d",
        "textColor": "#fecaca",
        "textCentered": true
      }
    }
  ]
}

resulting in the following notice
CleanShot 2024-03-26 at 00 03 52@2x

Test plan

  • Updated existing regression tests
  • Manually tested with various site-config settings.

…DismissibleAlert to accept and render backgroundColor
…missibleAlert to accept boolean for placing text in center of banner
@cla-bot cla-bot Bot added the cla-signed label Mar 22, 2024
@cla-bot

cla-bot Bot commented Mar 25, 2024

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement (CLA), and we don't have yours on file. In order for us to review and merge your code, please sign CLA to get yourself added.

Sourcegraph teammates should refer to Accepting contributions for guidance.

@cla-bot cla-bot Bot removed the cla-signed label Mar 25, 2024
@cla-bot

cla-bot Bot commented Mar 25, 2024

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement (CLA), and we don't have yours on file. In order for us to review and merge your code, please sign CLA to get yourself added.

Sourcegraph teammates should refer to Accepting contributions for guidance.

@RXminuS

RXminuS commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Mar 25, 2024
@cla-bot

cla-bot Bot commented Mar 25, 2024

Copy link
Copy Markdown

The GitHub CLA Bot is rechecking to see that you have signed the CLA - note that it may take up to 30 minutes for your response to be synchronized.

@sourcegraph-bot

sourcegraph-bot commented Mar 25, 2024

Copy link
Copy Markdown
Contributor

📖 Storybook live preview

@RXminuS RXminuS self-assigned this Mar 25, 2024
@RXminuS RXminuS requested a review from aramaraju March 25, 2024 23:08
@aramaraju

Copy link
Copy Markdown

LGTM - @RXminuS

Recommend a review from the Search team and let's not forget docs for these changes @MaedahBatool

@RXminuS RXminuS requested a review from a team March 26, 2024 16:13
@keegancsmith keegancsmith requested review from a team and removed request for a team March 27, 2024 10:43
@RXminuS

RXminuS commented Mar 29, 2024

Copy link
Copy Markdown
Contributor

@MaedahBatool I got some basic docs going https://github.com/sourcegraph/sourcegraph/pull/61338/commits/e54d93254846c35796d2bfb13be4d071ec3e6852

Would love your help and to double check I edited the correct things.

@RXminuS RXminuS enabled auto-merge (squash) April 5, 2024 13:09
@RXminuS RXminuS merged commit ccba7d4 into main Apr 5, 2024
@RXminuS RXminuS deleted the bc/custom-notices-background-color branch April 5, 2024 14:33
@RXminuS RXminuS restored the bc/custom-notices-background-color branch April 16, 2024 11:00
@RXminuS RXminuS deleted the bc/custom-notices-background-color branch April 16, 2024 11:06
RXminuS pushed a commit that referenced this pull request Apr 16, 2024
… position. (#61338)

Closes #59751

Co-authored-by: Rik Nauta <rik.nauta@sourcegraph.com>
Chickensoupwithrice pushed a commit that referenced this pull request Apr 18, 2024
…text color, and text position. (#61915)

Notices: Add customization for background color, text color, and text position. (#61338)

Closes #59751

Co-authored-by: Bill Caplan <bill.caplan@sourcegraph.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notice Banner Color Selection

4 participants