Skip to content

Add solarized dark to editor themes#251

Merged
Rokt33r merged 6 commits intoBoostIO:masterfrom
georgeherby:patch-1
Jan 6, 2020
Merged

Add solarized dark to editor themes#251
Rokt33r merged 6 commits intoBoostIO:masterfrom
georgeherby:patch-1

Conversation

@georgeherby
Copy link
Copy Markdown
Contributor

This is not 100% finished as I have run into an issue.

I have added the line to add solarized dark to the editor themes. This applies fine but not so when i add it to the code blocks. See image.

image

I am happy to continue the work but would appreciate a pointer to help find out what is up.

@claassistantio
Copy link
Copy Markdown

claassistantio commented Jan 3, 2020

CLA assistant check
All committers have signed the CLA.

Still not working for codeblock but fixes another issue
@Rokt33r
Copy link
Copy Markdown
Member

Rokt33r commented Jan 3, 2020

@georgeherby Please revert the last commit which import style manually and check ThemeLink component in src/components/CodeMirrorStyle.tsx file.

The component is injecting the style so we need to replace theme name before injecting solarized-dark like the below.

if (theme === 'solarized-dark') {
  theme = 'solarized'
}

Also check src/components/atoms/MarkdownPreviewer.tsx component. At the line 75, its markdown plugin is injecting cm-s-{theme}. Like the line, injecting cm-s-dark class when theme is solarized dark should fix the code fence problem.

@georgeherby
Copy link
Copy Markdown
Contributor Author

Thanks @Rokt33r all done!
image

PS thanks for the title bar change earlier too 😍

Copy link
Copy Markdown
Member

@Rokt33r Rokt33r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer solarized-dark.

Comment thread src/components/atoms/MarkdownPreviewer.tsx Outdated
Comment thread src/components/CodeMirrorStyle.tsx Outdated
Comment thread src/lib/CodeMirror.ts Outdated
Comment thread src/components/atoms/MarkdownPreviewer.tsx Outdated
@georgeherby
Copy link
Copy Markdown
Contributor Author

georgeherby commented Jan 5, 2020

As mentioned on Slack

With regards to adding in the - to solarized dark. If i do this is is not applied to the editor theme correctly. But if i do not have the - it works 🤷

@Rokt33r Rokt33r merged commit 8f51c69 into BoostIO:master Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants