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

Brand colour tweaks #1141

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.2.0-dev.18 @microbit-foundation/website-deploy-aws@0.3.0 @microbit-foundation/website-deploy-aws-config@0.7.1 @microbit-foundation/circleci-npm-package-versioner@1
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.2.0-brand.guidelines.21 @microbit-foundation/website-deploy-aws@0.3.0 @microbit-foundation/website-deploy-aws-config@0.7.1 @microbit-foundation/circleci-npm-package-versioner@1
if: github.repository_owner == 'microbit-foundation'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion src/common/GenericDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const GenericDialogFooter = ({
<Link
onClick={onCloseDontShowAgain}
as="button"
color="brand.500"
color="brand1.500"
mr="auto"
>
<FormattedMessage id="dont-show-again" />
Expand Down
2 changes: 1 addition & 1 deletion src/common/PostSaveDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const PostSaveDialogBody = ({
values={{
link: (chunks: ReactNode) => (
<Link
color="brand.500"
color="brand1.500"
onClick={handleShowTransferHexHelp}
href=""
>
Expand Down
2 changes: 1 addition & 1 deletion src/common/SplitView/HideSplitViewButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const HideSplitViewButton = React.forwardRef(
minW="unset"
width={mode === "icon" ? "20px" : "auto"}
background="#eaecf1"
color="brand.500"
color="brand1.500"
variant="ghost"
zIndex={splitViewHideButton}
boxShadow={direction === "expandLeft" ? "md" : "none"}
Expand Down
2 changes: 1 addition & 1 deletion src/common/SplitView/SplitViewDivider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const SplitViewDivider = ({ showBoxShadow = false }: SplitViewDividerProps) => {
>
<Icon
as={RiMore2Fill}
color="brand.500"
color="brand1.500"
h={6}
w={6}
transform={direction === "row" ? "" : "rotate(90deg)"}
Expand Down
3 changes: 2 additions & 1 deletion src/deployment/default/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const gray = {
};

const colors = {
brand: gray,
brand1: gray,
brand2: gray,
gray,
code: {
blockBorder: theme.colors.gray[400],
Expand Down
6 changes: 5 additions & 1 deletion src/documentation/api/ApiDocumentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ const ActiveLevel = ({
id="api-description"
values={{
link: (chunks: ReactNode) => (
<Link color="brand.500" onClick={handleReferenceLink} href="">
<Link
color="brand1.500"
onClick={handleReferenceLink}
href=""
>
{chunks}
</Link>
),
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/api/ApiNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ const DraggableSignature = ({
display="inline-flex"
overflow="hidden"
borderWidth="1px"
borderColor="blimpTeal.300"
borderColor="brand2.300"
borderRadius="lg"
onMouseEnter={highlight.onOpen}
onMouseLeave={highlight.onClose}
Expand All @@ -483,7 +483,7 @@ const DraggableSignature = ({
/>
<Text
minW={40}
background={highlight.isOpen ? "blimpTeal.50" : "white"}
background={highlight.isOpen ? "brand2.50" : "white"}
transition="background .2s"
p={2}
fontFamily="code"
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/CodeActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CodeActionButton = ({
fontWeight="normal"
color="gray.800"
border="none"
bgColor={hovered ? "blimpTeal.300" : "blimpTeal.100"}
bgColor={hovered ? "brand2.300" : "brand2.100"}
borderTopRadius="0"
borderBottomRadius="lg"
ml={5}
Expand Down
6 changes: 3 additions & 3 deletions src/documentation/common/CodeEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const CodeEmbed = ({
(toolkitType === "ideas" && state === "highlighted") ||
(toolkitType !== "ideas" && state !== "default")
) {
return "blimpTeal.50";
return "brand2.50";
}
return "white";
};
Expand Down Expand Up @@ -244,7 +244,7 @@ const CodePopUp = ({
full={full}
position="absolute"
// We're always "raised" as this is the pop-up.
background={toolkitType === "ideas" ? "white" : "blimpTeal.50"}
background={toolkitType === "ideas" ? "white" : "brand2.50"}
boxShadow="rgba(0, 0, 0, 0.18) 0px 2px 6px"
highlightDragHandle
toolkitType={toolkitType}
Expand Down Expand Up @@ -328,7 +328,7 @@ const Code = forwardRef<CodeProps, "pre">(
draggable={toolkitType === "ideas" ? false : true}
transition="background .2s, box-shadow .2s"
borderWidth="1px"
borderColor="blimpTeal.300"
borderColor="brand2.300"
borderRadius="lg"
fontFamily="code"
overflow="hidden"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const DocumentationBreadcrumbHeading = ({
fontSize="md"
whiteSpace="normal"
textAlign="left"
color="brand.500"
color="brand1.500"
>
<Text as="span">
{grandparent && grandparent + " / "}
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/DocumentationContent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("DocumentationContent", () => {
];
const rendered = render(<DocumentationContent content={content} />);
expect(rendered.container.innerHTML).toMatchInlineSnapshot(
`"<div class=\\"chakra-stack css-bs1yt6\\"><p><a target=\\"_blank\\" rel=\\"nofollow noopener\\" class=\\"chakra-link css-1w3ukj\\" href=\\"https://www.bbc.co.uk/bitesize/guides/zscvxfr/revision/4\\">Read more about ASCII<svg stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" viewBox=\\"0 0 24 24\\" focusable=\\"false\\" class=\\"chakra-icon css-q1kx43\\" height=\\"1em\\" width=\\"1em\\" xmlns=\\"http://www.w3.org/2000/svg\\"><g><path fill=\\"none\\" d=\\"M0 0h24v24H0z\\"></path><path d=\\"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8z\\"></path></g></svg></a>.</p></div>"`
`"<div class=\\"chakra-stack css-bs1yt6\\"><p><a target=\\"_blank\\" rel=\\"nofollow noopener\\" class=\\"chakra-link css-11x26cq\\" href=\\"https://www.bbc.co.uk/bitesize/guides/zscvxfr/revision/4\\">Read more about ASCII<svg stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" viewBox=\\"0 0 24 24\\" focusable=\\"false\\" class=\\"chakra-icon css-q1kx43\\" height=\\"1em\\" width=\\"1em\\" xmlns=\\"http://www.w3.org/2000/svg\\"><g><path fill=\\"none\\" d=\\"M0 0h24v24H0z\\"></path><path d=\\"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8z\\"></path></g></svg></a>.</p></div>"`
);
});

Expand Down
6 changes: 3 additions & 3 deletions src/documentation/common/DocumentationContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const DocumentationApiLinkMark = (
const [, setState] = useRouterState();
return (
<Link
color="brand.600"
color="brand1.600"
onClick={(e) => {
e.preventDefault();
setState({
Expand All @@ -89,7 +89,7 @@ const DocumentationInternalLinkMark = (
const [state, setState] = useRouterState();
return (
<Link
color="brand.600"
color="brand1.600"
onClick={(e) => {
e.preventDefault();
setState(
Expand All @@ -114,7 +114,7 @@ const DocumentationExternalLinkMark = (
) => {
return (
<Link
color="brand.600"
color="brand1.600"
href={props.mark.href}
target="_blank"
rel="nofollow noopener"
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/DocumentationTopLevelItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const DocumentationTopLevelItem = ({
{ name }
)}
size="sm"
color="brand.200"
color="brand1.300"
variant="ghost"
fontSize="2xl"
/>
Expand Down
8 changes: 2 additions & 6 deletions src/documentation/common/DragHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ const DragHandle = ({ highlight, ...props }: DragHandleProps) => {
<HStack
cursor="grab"
{...props}
bgColor={highlight ? "blimpTeal.300" : "blimpTeal.100"}
bgColor={highlight ? "brand2.300" : "brand2.100"}
transition="background .2s"
>
<DragHandleIcon
boxSize={3}
color="blimpTeal.600"
transition="color .2s"
/>
<DragHandleIcon boxSize={3} color="brand2.600" transition="color .2s" />
</HStack>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/MoreButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FormattedMessage } from "react-intl";
const MoreButton = (props: ButtonProps) => (
<Button
fontWeight="normal"
color="brand.500"
color="brand1.500"
variant="unstyled"
display="flex"
size="sm"
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/ShowMoreButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ShowMoreButton = ({ isOpen, isBrief, ...props }: ShowMoreLinkProps) => {
<Link
{...props}
as="button"
color="brand.600"
color="brand1.600"
textAlign="left"
_hover={{
textDecoration: "none",
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/V2Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const V2Tag = ({ ...props }: V2TagProps) => {
return (
<Tag
fontWeight="semibold"
background="brand.500"
background="brand1.500"
color="gray.25"
minH="unset"
pt="1px"
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/ideas/IdeasDocumentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const ActiveLevel = ({
values={{
link: (chunks: ReactNode) => (
<Link
color="brand.500"
color="brand1.500"
href="https://microbit.org/projects/make-it-code-it/?filters=python"
target="_blank"
rel="noopener"
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/reference/Highlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const Highlight = ({

const style = highlighting
? {
backgroundColor: "brand.100",
backgroundColor: "brand1.100",
transition: "background-color ease-out 0.2s",
}
: { transition: "background-color ease-in 0.6s" };
Expand Down
4 changes: 2 additions & 2 deletions src/documentation/search/SearchResultList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const SearchResultItem = ({
e.preventDefault();
onViewResult(id, navigation);
}}
_hover={{ textDecor: "none", bgColor: "brand.100" }}
_focus={{ bgColor: "brand.100" }}
_hover={{ textDecor: "none", bgColor: "brand1.50" }}
_focus={{ bgColor: "brand1.50" }}
>
<Stack px={8} py={2} spacing={0}>
{title !== containerTitle && (
Expand Down
2 changes: 1 addition & 1 deletion src/editor/ModuleOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ModuleOverlay = ({ moduleData }: ModuleOverlayProps) => {
values={{
link: (chunks: ReactNode) => (
<Link
color="brand.500"
color="brand1.500"
as="button"
onClick={handleShowSettings}
>
Expand Down
30 changes: 19 additions & 11 deletions src/editor/codemirror/language-server/documentation.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,37 @@
.docs-spacing code {
font-family: "Source Code Pro", monospace;
}
.docs-spacing * + * {

.docs-spacing *+* {
margin-top: var(--chakra-space-2);
}
.docs-spacing * + p {

.docs-spacing *+p {
margin-top: var(--chakra-space-3);
}
.docs-spacing * + code {

.docs-spacing *+code {
margin-top: var(--chakra-space-3);
}
.docs-spacing hr + *,
.docs-spacing * + hr {

.docs-spacing hr+*,
.docs-spacing *+hr {
margin-top: var(--chakra-space-1);
}

.docs-spacing code {
white-space: pre-wrap;
}

.docs-spacing ul,
.docs-spacing ol {
margin-left: var(--chakra-space-5);
}

.docs-spacing a {
color: var(--chakra-colors-brand-500);
color: var(--chakra-colors-brand1-500);
}

.docs-spacing pre {
padding: var(--chakra-space-1);
}
Expand All @@ -38,7 +46,7 @@
pre {
background-color: #fff;
border-radius: var(--chakra-radii-md);
border-color: var(--chakra-colors-blimpTeal-100);
border-color: var(--chakra-colors-brand2-100);
border-style: solid;
border-width: 1px;
}
Expand All @@ -58,15 +66,15 @@ pre {
width: fit-content;
}

.docs-code > pre > code,
.docs-code.docs-code-muted > pre > code {
.docs-code>pre>code,
.docs-code.docs-code-muted>pre>code {
display: block;
border: none;
background-color: unset;
}

.docs-skip-signature > pre:first-of-type {
.docs-skip-signature>pre:first-of-type {
border: none;
padding: 0;
background-color: unset;
}
}
2 changes: 1 addition & 1 deletion src/editor/codemirror/language-server/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const createStyledAnchorElement = (): HTMLAnchorElement => {
const anchor = document.createElement("a");
anchor.href = "";
anchor.style.fontSize = "var(--chakra-fontSizes-sm)";
anchor.style.color = "var(--chakra-colors-brand-600)";
anchor.style.color = "var(--chakra-colors-brand1-600)";
anchor.style.display = "block";
anchor.style.margin = "0";
anchor.style.padding = "0.5rem";
Expand Down
2 changes: 1 addition & 1 deletion src/project/ProjectArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ProjectArea = ({
key={f.name}
fontWeight={selected ? "semibold" : undefined}
_hover={{
bgColor: "blimpTeal.100",
bgColor: "brand2.100",
}}
pl={2}
pr={1}
Expand Down
2 changes: 1 addition & 1 deletion src/project/ProjectNameEditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ProjectNameEditable = ({
size="md"
icon={<RiEdit2Line />}
fontSize="xl"
color="brand.500"
color="brand1.500"
variant="ghost"
onClick={handleClick}
aria-label={intl.formatMessage({ id: "edit-project-name-action" })}
Expand Down
2 changes: 1 addition & 1 deletion src/settings/LanguageDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const LanguageDialog = ({
href={deployment.translationLink}
target="_blank"
rel="noopener"
color="brand.500"
color="brand1.500"
>
<FormattedMessage id="help-translate" />{" "}
<Icon as={RiExternalLinkLine} />
Expand Down
2 changes: 1 addition & 1 deletion src/simulator/CompassModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const CompassModule = ({
<Icon
ref={ref}
as={CompassHeadingIcon}
color="blimpTeal.400"
color="brand2.500"
boxSize="20"
/>
</HStack>
Expand Down
Loading