Commit Graph

8 Commits

Author SHA1 Message Date
Bennet Bo Fenner
fb83cf2042
notification panel: rework time formatting (#8997)
Follow up of #7994 to rework the notification panel timestamps.
This PR also includes some of the changes @evrsen proposed in #8996 
Here is what it looks like now:


https://github.com/zed-industries/zed/assets/53836821/d85450e7-eab6-4fe7-bd11-1d76c0e87258

Release Notes:
- Reworked date time formatting in the chat and the notification panel
- Added hover style to notifications and hovering tooltip on timestamps

---------

Co-authored-by: Evren Sen <146845123+evrsen@users.noreply.github.com>
2024-03-12 21:02:04 -06:00
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level (#8891)
This PR moves the Clippy configuration up to the workspace level.

We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.

Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:

```toml
[lints]
workspace = true
```

This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:

```json
{
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "check": {
          "command": "clippy"
        }
      }
    }
  }
```

Release Notes:

- N/A
2024-03-05 12:01:17 -05:00
Marshall Bowers
7f5aa1fca6
Replace lazy_static! with OnceLock in time_format crate (#8648)
This PR replaces a `lazy_static!` usage in the `time_format` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

Release Notes:

- N/A
2024-02-29 23:58:45 -05:00
Nathan Sobo
4cc4f08a53
Remove ! from todo!() in comments (#8643)
This practice makes it difficult to locate todo!s in my code when I'm
working. Let's take out the bang if we want to keep doing this.

Release Notes:

- N/A
2024-02-29 18:19:05 -07:00
Dzmitry Malyshau
cb75c57fc0
Cleanup dependencies (part 4) (#8468)
Follow-up to #8425 . Final part - adds the CI check.

Release Notes:
- N/A
2024-02-27 20:41:49 +02:00
Dzmitry Malyshau
76196694b7 Fix unused warning in time_format 2024-02-24 00:04:00 -08:00
Marshall Bowers
03b0764df4 Replace time_format license with symlink 2024-02-23 21:54:39 -05:00
Bennet Bo Fenner
dc7e14f888
Respect user preferences when formatting timestamp (#7994)
This is a follow up to #7945. The current behaviour reads the locale and
infers from that which type of time format should be used (12 hour/24
hour).
However, in macOS you can override this behaviour, e.g. you can use
en_US locale but still use the 24 hour clock format (Can be customized
under Settings > General > Date & Format > 24-hour time). You can even
customize the date format.

This PR uses the macOS specific `CFDateFormatter` API, which outputs
time format strings, that respect those settings.

Partially fixes #7956 (as its not implemented for linux)

Release Notes:

- Added localization support for all macOS specific date and time
configurations in chat
2024-02-23 19:18:06 -07:00