Commit Graph
100 Commits
Author SHA1 Message Date
Nate Butler c130dd6b47 Add styles for an action_button ahead of the "Select all matches" UI button 2023-07-14 14:47:12 +03:00
Nate Butler ad4f5e55cb Update docs (#2712)
Update docs

Release Notes:

- N/A
2023-07-12 15:00:11 -04:00
Nate ButlerandDerek Briggs 6297675055 Update building-zed.md
Co-Authored-By: Derek Briggs <1648941+PixelJanitor@users.noreply.github.com>
2023-07-12 14:09:21 -04:00
Nate ButlerandPiotr Osiewicz 001e848393 Update picker footer button style
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-07-12 12:40:37 -04:00
Nate Butler 6739c31594 Update assistant styles (#2665)
Updates the assistant with some style quality of life changes.

## Changes

Restyled the conversation list

<img width="646" alt="CleanShot 2023-07-10 at 10 25 23@2x"
src="https://github.com/zed-industries/zed/assets/1714999/5c9a4f94-11c1-4d28-8aac-4d38141829a9">

Updated the assistant header to be a bit more compact, and use a new tab
bar icon style. The existing tab bar icons will be updated in a later
PR.

<img width="646" alt="CleanShot 2023-07-10 at 10 26 30@2x"
src="https://github.com/zed-industries/zed/assets/1714999/3ef9a053-59fa-4d34-9b76-3bb2701acb33">

Updated the remaining token indicator to have 3 steps:
<img width="662" alt="CleanShot 2023-07-10 at 10 29 51@2x"
src="https://github.com/zed-industries/zed/assets/1714999/13d31545-5b00-427c-b7da-b4dfeac037d6">

Updated role labels, added a hover state to make it more clear these are
interactive
<img width="984" alt="CleanShot 2023-07-10 at 10 32 28@2x"
src="https://github.com/zed-industries/zed/assets/1714999/24748495-dde4-4ee9-98f1-6a082f0c1d4d">


Release Notes:

- Improved the UI of some elements in the Assistant panel.
2023-07-10 10:54:20 -04:00
Nate Butler 273b9e1636 Avoid overlapping the scrollbar 2023-07-10 10:44:39 -04:00
Nate Butler 9ffe220def Update tab_bar_button.ts 2023-07-10 10:24:24 -04:00
Nate Butler 4029481fd0 Merge branch 'main' into update-assistant-styles 2023-07-10 10:22:18 -04:00
Nate Butler f0cddeb478 Update zoom icons 2023-07-10 10:09:59 -04:00
Nate Butler 793eff1695 Update scrollbar selection style 2023-07-06 10:54:47 -04:00
Nate Butler 76873c508a Z-2276/Z-2275: Project & Branch switchers (#2662)
This PR adds project and branch switchers in top left corner. 

Release Notes:
- Added a project & branch switcher under project name.
2023-07-05 13:09:40 -04:00
Nate ButlerandPiotr Osiewicz 1baa13561d Update project & git menus to be Toggleable<Interactive<ContainedText>>
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-07-05 12:50:56 -04:00
Nate Butler de01fa1794 Update collaboration sounds, add sounds to screensharing (#2679)
Updates all collab sounds, add screen sharing sounds.

Release Notes:

- Improved collaboration sounds for joining and leaving a call, muting
and unmuting the mic.
- Added a sound when you start and stop screen sharing.
2023-07-05 12:30:47 -04:00
Nate Butler a7ce602bac Update collaboration sounds, add sounds to screensharing 2023-07-04 16:18:42 -04:00
Nate Butler 76af424d79 Rename color_scheme -> theme (#2677)
Just some theme tidying, renames some things to be more consistent with
our planned naming conventions going forward.

Release Notes:

- N/A (No public facing changes)
2023-07-04 11:56:30 -04:00
Nate Butler f461a70970 Remove unused ts aliases 2023-07-04 01:37:45 -04:00
Nate Butler 65dbb38926 color_scheme -> theme 2023-07-04 01:20:56 -04:00
Nate Butler c5a42c317a Remove unused color_scheme field in the theme (#2676)
We removed the `theme_testbench` crate a while back - It seems like that
was the only thing using the `color_scheme` field in the exported theme.

Removing this from the theme removes something like 42k lines of
generated JSON every time we build the theme (2k lines / 28% of the
total lines per generated theme!)

Release Notes:

- N/A (No public facing changes)
2023-07-04 00:58:37 -04:00
Nate Butler a732b2e043 Remove unused color_scheme field in the theme
I totally didn't mean to commit this right to main T_T
2023-07-04 00:44:12 -04:00
Nate Butler c409059dc4 Revert "Remove unused color_scheme field in the theme"
This reverts commit 5a1476a1e5.
2023-07-04 00:41:13 -04:00
Nate Butler 5a1476a1e5 Remove unused color_scheme field in the theme 2023-07-04 00:40:01 -04:00
Nate Butler 0b4c5db5e2 Use theme store to pass color_scheme directly to components (#2675)
This PR adds a theme store to allow components to directly access the
theme without requiring it to be passed down as props every time it is
used.

So before, you might need to do something like `text(theme, "variant",
"hovered")`, you could now just call `text("variant", "hovered")`.

This also means that style_trees don't need to be called with a theme
either:

```ts
export default function app(): any {
    const theme = useTheme()

    return {
        meta: {
            name: theme.name,
            is_light: theme.is_light,
        },
        command_palette: command_palette(),
        contact_notification: contact_notification(),
        // etc...
    }
}
```

We do this by creating a zustand store to store the theme, and allow it
to be accessed with `useThemeStore.getState().theme`.

```ts
import { create } from "zustand"
import { ColorScheme } from "./color_scheme"

type ThemeState = {
    theme: ColorScheme | undefined
    setTheme: (theme: ColorScheme) => void
}

export const useThemeStore = create<ThemeState>((set) => ({
    theme: undefined,
    setTheme: (theme) => set(() => ({ theme })),
}))

export const useTheme = (): ColorScheme => {
    const { theme } = useThemeStore.getState()

    if (!theme) throw new Error("Tried to use theme before it was loaded")

    return theme
}
```

Release Notes:

- N/A (No public facing changes)
2023-07-04 00:37:45 -04:00
Nate Butler 8a5e7047f0 Update a few more components 2023-07-04 00:32:27 -04:00
Nate Butler d5acfe8fc1 Use theme store to pass color_scheme directly to components 2023-07-04 00:13:04 -04:00
Nate Butler 530561e4eb Extract assistant tool buttons into tab_bar_button 2023-06-29 18:13:31 -04:00
Nate Butler 77b120323b Add low_tokens_remaining case to the assistant 2023-06-29 17:44:47 -04:00
Nate Butler d6112e4a59 Add doc comments for ColorScheme layer properties 2023-06-29 17:32:19 -04:00
Nate Butler 2678dfdc57 Update assistant styles 2023-06-29 17:32:04 -04:00
Nate Butler 143a020694 Update Hint Style
zzz
2023-06-29 22:39:17 +03:00
Nate Butler ae9eb7c67a Re-add missing active state (#2664)
[[PR Description]]

Release Notes:

- Fixes project panel active state that was incorrectly removed.
2023-06-29 14:45:19 -04:00
Nate Butler 764968e7d0 Re-add missing active state 2023-06-29 14:40:00 -04:00
Nate Butler c7c38c7da2 snake_case theme (#2661)
This PR moves the theme / `/styles` typescript app to use snake_case to
better align with the rust app and make it easier to reference things
across both apps.

It also configures ESLint in the styles app and fixes many ESLint
errors.

Going forward from this PR we will use `snake_case` throughout the
theme.

Release Notes:

- N/A (No public facing changes)
2023-06-29 12:47:15 -04:00
Nate Butler 5211328234 Delete snake_case.ts 2023-06-29 11:56:14 -04:00
Nate Butler d285d56fe3 Update package-lock.json 2023-06-29 11:48:17 -04:00
Nate Butler 8bff641cc4 Organize and update dotfiles 2023-06-29 11:47:58 -04:00
Nate Butler a6f7e31bb9 Update & format 2023-06-29 11:41:51 -04:00
Nate Butler 97dc7b77f4 WIP snake_case 5/? 2023-06-29 11:31:23 -04:00
Nate Butler 0627c198fd WIP snake_case 4/? 2023-06-29 10:57:19 -04:00
Nate Butler 17f2fed3c8 WIP snake_case 3/? 2023-06-29 02:16:21 -04:00
Nate Butler ba17fae8d9 WIP snake_case 2/? 2023-06-29 01:48:40 -04:00
Nate Butler b015f506da WIP snake_case 1/?
through `contact_notification`
2023-06-28 22:42:57 -04:00
Nate Butler 2e162f8af7 WIP convert to snake_case 2023-06-28 18:20:43 -04:00
Nate Butler bfdd0824e2 Resolve TS errors and warnings
TODO: Use StyleTree types to remove `any`s from styleTrees.
2023-06-28 17:54:36 -04:00
Nate Butler 1177980172 Fix basic eslint errors 2023-06-28 16:44:18 -04:00
Nate Butler e30ad9109c wip 2023-06-28 16:28:46 -04:00
Nate Butler cf8e0befc8 Update 2023-06-28 13:27:41 -04:00
Nate Butler c381e8821c Update icon sizes 2023-06-28 10:19:30 -04:00
Nate Butler a889f3db54 Reduce the right spacing of the contacts menu 2023-06-28 10:06:12 -04:00
Nate Butler 9a07696240 Update titlebar item spacing 2023-06-27 17:56:44 -04:00
Nate Butler 8b2732c3aa workspace.titlebar -> titlebar in Theme 2023-06-27 17:27:58 -04:00
Nate Butler 825a7cb799 Update screenshare toggle, titlebar spacing 2023-06-27 16:20:45 -04:00
Nate Butler b4f9faee3b Update share, call control buttons 2023-06-27 12:24:19 -04:00
Nate Butler 5af33407f0 Add script for building theme types 2023-06-27 11:34:26 -04:00
Nate Butler 331800c14d Use icon_button for leave call 2023-06-27 11:34:12 -04:00
Nate Butler 9389b50646 Update local-collaboration.md
Add missing livekit info
2023-06-27 10:52:38 -04:00
Nate Butler 0548df09d9 Update local-collaboration.md 2023-06-27 10:05:37 -04:00
Nate Butler f311d307b1 Create local-collaboration.md (#2651)
I forget how to do this every single time 😅 Please update anything that
is incorrect!

[[PR Description]]

Release Notes:

- N/A
2023-06-27 09:52:15 -04:00
Nate Butler a67eba9fed Create local-collaboration.md
I forget how to do this every single time 😅
2023-06-27 09:51:30 -04:00
Nate Butler 37814bc4fc Fix incorrect ThemeAppearance (#2645)
[[PR Description]]

When we updated the way themes were built it looks like we accidentally
gave `Atelier Forest Light` the wrong `ThemeAppearance`. This PR fixes
that.

Release Notes:

- Fixed the `Atelier Forest Light` theme, which was incorrectly set as a
dark theme.
2023-06-26 13:20:32 -04:00
Nate Butler 1dc52c7547 Fix incorrect ThemeAppearance 2023-06-26 13:07:33 -04:00
Nate Butler a305d93567 Z-2308 - Export Theme Types from Rust (#2621)
This PR adds JSON Schema definitions into GPUI's styles and adds a tool
for generating typescript types from these schema definitions.

Release Notes:

- N/A
2023-06-22 12:33:18 -04:00
Nate Butler 1a0b2bfef8 Update stream control icons 2023-06-22 12:21:59 -04:00
Nate Butler 1079838443 Add mic and mic-mute icons 2023-06-22 12:00:42 -04:00
Nate Butler 05730afdf0 Add radix icons
There are a lot of them, but they add less than 350kb to the app
2023-06-22 11:58:51 -04:00
Nate Butler 6ab0143469 Split Interactive into Interactive and Toggleable (#2628)
This is a part of the intensity driven theme rewrite. 

It introduces the `toggle` and `interactive` helper functions to build
Toggle<T> and Interactive<T> styles for interactive elements in the
theme.

This PR also removes the `theme_testbench` crate and related actions.

Huge thanks to @osiewicz and @mikayla-maki for pushing this forward 🙏🏽

Release Notes:

- Updated the style of many interactive elements.
2023-06-21 15:03:08 -04:00
Nate Butler 9d9bbfdabf Format 2023-06-21 13:58:54 -04:00
Nate Butler a845e82173 Update settings.json 2023-06-21 13:58:42 -04:00
Nate Butler ed8bdd186e Update toggle active styles 2023-06-21 13:56:27 -04:00
Nate Butler 127f4aa506 Fix status bar buttons 2023-06-21 13:14:39 -04:00
Nate Butler af8671cf7f Update rose pine theme family (#2624)
Update the Rose Pine theme family, including new syntax overrides
matching the official theme docs:
https://rosepinetheme.com/palette/ingredients/

Also adds a doc to our internal docs starting to outline how our syntax
highlighting works.

Before:
<img width="626" alt="CleanShot 2023-06-21 at 12 19 17@2x"
src="https://github.com/zed-industries/zed/assets/1714999/5ebe1cd0-1707-483b-a50f-bb53dbf89ba2">

After:
<img width="718" alt="CleanShot 2023-06-21 at 12 18 48@2x"
src="https://github.com/zed-industries/zed/assets/1714999/46b588aa-31a0-4402-934b-e3de7bc2f6b5">

From their site:

![image](https://github.com/zed-industries/zed/assets/1714999/83d4f671-e15f-4423-a01e-b382145e79fb)


Release Notes:

- Updated Rose Pine theme family to better match original theme.
2023-06-21 12:46:18 -04:00
Nate Butler a3e65528ba Update syntax colors 2023-06-21 12:21:01 -04:00
Nate Butler eeb155a951 Remove unused light variable 2023-06-21 12:20:47 -04:00
Nate Butler f0138a7a87 Add initial syntax highlighting doc 2023-06-21 12:15:24 -04:00
Nate Butler ae53c3e623 WIP: Start updating style trees to new toggle() format. 2023-06-20 16:05:23 -07:00
Nate Butler 61535ed41f Update toggle, add tests 2023-06-20 16:05:23 -07:00
Nate Butler 040881df3f Update toggle 2023-06-20 16:05:23 -07:00
Nate Butler 5c034ab63c Format 2023-06-20 16:05:23 -07:00
Nate Butler 1f3feacb21 Add path aliases 2023-06-20 16:05:23 -07:00
Nate Butler 5369f2c25a Set up vitest and add tests for interactive 2023-06-20 16:05:23 -07:00
Nate Butler 247f618d4f Update the interactive function 2023-06-20 16:05:23 -07:00
Nate Butler 16564707df Use TS-flavored doc comments 2023-06-20 16:05:23 -07:00
Nate Butler ffd1190cca Update rose pine theme family 2023-06-16 23:02:32 -04:00
Nate Butler 0863486803 Add internal markdown docs (#2598)
This PR adds internal docs directly to the codebase.

There are a few goals here:

- Make it easier to document our internal processes
- Put the documentation where people already are
- Allow changes to be in sync with PRs
- Make it easier for people coming in to discover our docs and onboard
faster.

With 2 more people joining us in the next few weeks it would be great to
get these up.

Release Notes:

- N/A (No public facing changes)
2023-06-15 10:55:55 -04:00
Nate Butler 87c3216236 Fix design tools link 2023-06-15 10:38:15 -04:00
Nate ButlerandPiotr Osiewicz 5149db6acd Update docs/index.md
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-06-15 10:36:53 -04:00
Nate Butler 7f71ee0870 Expand tools doc further 2023-06-12 09:45:42 -04:00
Nate Butler f142449014 Add back links 2023-06-12 09:02:49 -04:00
Nate Butler 57ae64d44a Use simple markdown 2023-06-12 09:00:59 -04:00
Nate Butler 85b049f250 Build tokens for each theme (#2590)
This PR adds the ability to export tokens for each theme. 

You can export tokens by:

1. `cd styles`
2. `npm run build-tokens`
3. Tokens will be output in the target folder (`styles/target`)

The tokens match the ColorScheme object. In the future we may also
export tokens for our styleTrees.

Release Notes:

- N/A (No public facing changes)

---
TODO:

- [x] Generate Token Studio theme index file
- [x] ColorScheme
    - [x] name:
    - [x] isLight
    - [x] lowest
    - [x] middle
    - [x] highest
    - [x] popoverShadow
    - [x] modalShadow
    - [x] players
    - [x] syntax
2023-06-08 16:40:46 -04:00
Nate Butler ddcbc774ab $tokens.json => $themes.json 2023-06-08 16:36:15 -04:00
Nate Butler e4cbc29f98 Update buildTokens to export $metadata.json and $themes.json 2023-06-08 16:19:28 -04:00
Nate Butler 3719c206c9 Only export color tokens for syntax 2023-06-08 15:14:59 -04:00
Nate Butler 91e1bb8fd4 WIP syntax tokens 2023-06-08 15:12:11 -04:00
Nate Butler 999b2365a8 Export additional tokens, standardize naming convention 2023-06-08 12:21:51 -04:00
Nate Butler e2f46d5448 Build layer tokens for each theme 2023-06-08 11:15:59 -04:00
Nate Butler 16e3e04501 Update TSConfig (#2589)
Based on #2558. Also fixes errors resulting from the stricter options.

Release Notes:

- N/A (No public facing changes)
2023-06-08 01:31:21 -04:00
Nate Butler 1e43fec1c5 Update buildLicenses to only include the theme url if there is one 2023-06-08 01:23:19 -04:00
Nate Butler e996a66596 Update TSCondif
Based on #2558. Also fixes errors resulting from the stricter options.
2023-06-08 01:15:57 -04:00
Nate Butler a75e9faa83 Add foundation for exporting tokens from our color schemes (#2588)
We removed our Figma Tokens/Tokens Studio export a while back when we
moved to the theme to ColorSchemes. I'd like to get back to exporting
these so we can be working from up to date themes in Figma, especially
with the large amount of UI design work we'll be doing in the next few
weeks on channels.

This PR adds some basic plumbing to start working through the
theme/colorScheme and export the parts as tokens.

I also discovered that Tokens Studio now publishes their types, so we
can use them directly rather than writing our own:
https://github.com/tokens-studio/types

Pulled those in and started connecting them as well.

Running `npm run build-tokens` will export the tokens for each theme to
`styles/target/tokens`.

Currently only a few element's tokens are exported, will expand this
further as time permits.

Release Notes:

- N/A (No public facing changes)
2023-06-08 00:53:16 -04:00
Nate Butler c8a9d73ea6 Add foundation for exporting tokens 2023-06-08 00:37:00 -04:00