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

Make CSS an optional dependency #1443

Merged
merged 4 commits into from
Dec 10, 2019
Merged

Make CSS an optional dependency #1443

merged 4 commits into from
Dec 10, 2019

Conversation

citizenmatt
Copy link
Member

We use the CSS tooling to provide USS support. But if CSS is disabled in plugins, the entire Unity plugin is also disabled. This PR makes the CSS support an optional dependency. See RIDER-36523.

  • If CSS is enabled, everything works as before.
  • If CSS is disabled, there is no syntax highlighting or other USS support, but the rest of the Unity plugin continues to work.
  • The Unity plugin will also show an editor notification for *.uss files if CSS is disabled, prompting to re-enable the plugin, and show a toast notification to restart.

This PR also adds the correct icons for *.uss and *.uxml files (see RIDER-34788)

@citizenmatt citizenmatt self-assigned this Dec 9, 2019
@citizenmatt citizenmatt added this to the Rider 2019.3.1 milestone Dec 9, 2019
@citizenmatt
Copy link
Member Author

Feel free to comment on wording, etc.

Screenshot 2019-12-09 at 14 57 02

fun isUxmlFile(file: VirtualFile) = file.extension.equals("uxml", true)
Copy link
Member

Choose a reason for hiding this comment

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

it's a better practice to operate with file types rather than with actual hard-coded strings comparison. custom file associations can be added, there could be another extension in the future etc.

This is not a big problem for your scenario, and you also covered the 'ignore case' thing, but still...

Consider using FileTypeRegistry#isFileOfType is possible

@kashmervil
Copy link
Member

👍

@kashmervil kashmervil closed this Dec 9, 2019
@kashmervil kashmervil reopened this Dec 9, 2019
@citizenmatt citizenmatt merged commit 847aa76 into net193 Dec 10, 2019
@citizenmatt citizenmatt deleted the refactor/css-optional branch December 10, 2019 14:45
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.

2 participants