Code Monkey home page Code Monkey logo

ui's Introduction

official JetBrains project

🛑 The content of this repository has been moved to https://github.com/JetBrains/intellij-sdk-docs. Please report any issues and ideas there. The content is published at https://plugins.jetbrains.com/docs/intellij/ui-guidelines-welcome.html.

IntelliJ platform guidelines

This is a repository for IntelliJ platform user interface guidelines: https://jetbrains.design/intellij/

Working with the site locally

To check out and run a local copy of the site follow the steps described below.

Setup

  1. This site requires Jekyll. If you are not on macOS, click the links below for different OS instructions:

  2. Install IntelliJ IDEA or WebStorm

  3. Install bundler:

    gem install bundler
    
  4. Install mac developer tools:

    xcode-select —install
    
  5. Install ruby version manager chruby:

    brew install chruby ruby-install
    

    Open new terminal tab. Install ruby 3.0:

    ruby-install ruby 3.0.0
    

    Set ruby 3.0 as default. Add the following lines to the ~/.bash_profile or ~/.zshrc file:

      source /usr/local/opt/chruby/share/chruby/chruby.sh
      chruby ruby-3.0
    

Checking out site repository

To check out the source code run the following command:

git clone https://github.com/JetBrains/ui.git

and install the dependencies with Bundler inside the project directory:

cd ui/
bundle install

Building and previewing

To start the web-server go to the project directory and run:

bundle exec jekyll serve

Jekyll will build the site and start a web server, which can be viewed in your browser at http://localhost:4000/.

Running with Docker

Using Docker allows a cleaner dev environment to minimize Ruby configuration issues, as well as less need for other local macOS dependencies, e.g. Xcode command line tools. If you'd like to run Jekyll on Docker, follow these instructions:

  1. Using Homebrew, install Docker Desktop
brew install --cask docker
  1. Run the Docker Desktop app once to finish setup and give Docker permissions to run the engine in the background
  2. Build and run a Docker container with Jekyll dependencies installed
docker run --name intellij --volume="$PWD:/srv/jekyll" --publish 4000:4000 jekyll/jekyll jekyll serve --watch

Editing

To edit the guidelines open it in IDE. Guidelines pages are stored in _docs folder and are organised by categories. Pages are in Markdown format. See quick primer on writing in Markdown.

  • To edit a page open the required .md file and modify it. Enable preview mode for markdown files on the right top corner: test
  • To create a new page, create new .md file in the corresponding category directory. The file should start with:

---
title: Combobox
category: Components
---

The site is updated on the fly, refresh the page in browser to see changes. When you finish editing, publish your changes to the repository using VCS | Commit Changes..., which allows you to either commit or commit and push.

For more details review the blog post with tips and tricks on using IDE to maintain a Jekyll site.

ui's People

Contributors

bulenkov avatar c5inco avatar d-malkova avatar damien-urruty-sonarsource avatar dependabot[bot] avatar justint avatar karollewandowski avatar mishinalina avatar olyab avatar topka avatar yole avatar yopox avatar yzozulya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ui's Issues

Table selection state clarification

In the guidelines you write

Do not leave the active selection color in the table when the focus switches to some other element. It is otherwise confusing which element is currently active.

Just to better understand, should one implement this himself? Or should this be implemented at platform level?
I ask because this behavior isn't present at standard (e.g. JBTable), and I had to write my own logic with focus listeners.

addFocusListener(object : FocusListener {
   override fun focusGained(e: FocusEvent?) {
      updateColorsForFocusState(isFocused = true)
   }

   override fun focusLost(event: FocusEvent?) {
      updateColorsForFocusState(isFocused = false)
   }

   private fun updateColorsForFocusState(isFocused: Boolean) {
      setSelectionForeground(UIUtil.getTableSelectionForeground(isFocused))
      setSelectionBackground(UIUtil.getTableSelectionBackground(isFocused))
   }
})

Thanks 😄

Advertising quick-fix availability in inspection description

https://jetbrains.design/intellij/text/inspections/#13 says about inspection descriptions:

Provide details, such as:

  • A quick-fix if applicable:

    Suggests inserting the import statement

Most of the 'unused import' inspections don't follow this advice.
Mentioning the quick-fix as part of an example sounds fine to me,
but I don't see the point of mentioning separately that a quick-fix exists.

For example, VueMissingComponentImportInspection.html says:

Reports Vue components, which require to be imported in Vue templates.
It provides a quick-fix to add the missing import.

Intuitively, I would have removed the second sentence from the inspection description.
The quick-fix of adding the missing import is so obvious to me that I don't see why it should be mentioned.
In general, if the inspection supports a quick-fix, the user will see it in context.

What are the reasons for suggesting that inspections describe their quick-fixes separately from providing example code?

Code snippets for examples.

It would be great if there were examples how to create a widget for correct screenshots.

For instance, at the page https://jetbrains.github.io/ui/controls/link/ I would like to see that the link could be created by this Kotlin DSL example:

import com.intellij.ui.components.Link

panel {
  row {
    component(Link("Configure servers") { /* handle onClick */ })
  }
}

The expui icon path is different in IDEA 2024.x

The (extremely helpful!) Icons list page shows icons belonging to the New UI under AllIcons.Expui.....

It seems that the path in 2024.x was changed to com.intellij.icons.ExpUiIcons. ....

Please take it into consideration when updating the documentation.

Search field class never mentioned

The Search field control class is not mentioned eventhough the rest of the document seems to be finished.

This page: https://jetbrains.github.io/ui/controls/search_field/ does not state the class instead shows "To be implemented". Please mention which class to use.

On a side note, the whole plugin development documentation is very spartan. I'm actually quite surprised there are so many good plugins out there given how hard it is to develop one.

missing ExtendableTextField

https://jetbrains.github.io/ui/controls/built_in_button/#03 says "To place a button inside a text field, use the com.intellij.ui.components.fields.ExtendableTextField class and its addExtension method."
There is no further documentation on ExtendableTextField, and no jar file can be found that contains package com.intellij.ui.components.fields .

This is a bug in the sense that the documentation is clearly referring to a unicorn. Either the documentation page should be revised or the unicorn should be produced.

Durations that are updated regularly

https://jetbrains.design/intellij/principles/data_formats/#duration

Some labels show a duration that is updated in small intervals, typically several times per second.
One example is for the duration of running unit tests.
In cases like that, the width of the label should not change frequently, to avoid flickering or jumping around on the screen.
Could you perhaps add a sentence about that topic?
For example, in the duration of unit tests, the milliseconds should always be displayed using 3 digits, even if the last digit is 0.

Question about vertical insets

Not sure where to ask for clarifications on the guidelines so I'll just do it here.

The Layout page has a section about groups of controls. It is mentioned that small groups can be separated by vertical insets. However, it is not clear to me

  1. what the canonical way of creating such an inset is (should I use a VSpacer or is there a special component for this?)
  2. what the desired height for the spacing is (10 pixels, 50 pixels, and what if the user scales the UI?).

I think the guidelines would benefit from clarifying these details.

Permission to use JetBrains icons in my plugin

Hi. I'm developing a plugin for PascalABC.NET IDE. Its name is Yuki Theme. Here's link to the repo. I want to use JetBrains icons in my plugin.

PascalABC.NET IDE without my plugin:

bandicam 2021-12-21 19-15-14-069

with my plugin:

bandicam 2021-12-21 19-14-49-043

Window of my plugin:

bandicam 2021-12-21 19-15-54-147

Icons of PascalABC.NET:

bandicam 2021-12-20 18-09-53-230_icons

I want to use the icons to change the default icons of the IDE and icons of my pluign's window.
Can I use the icons in my plugin? I promise I'll add JetBrains.Icons to the used list:

bandicam 2021-12-21 19-20-43-294

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.