This commit is contained in:
@@ -43,6 +43,7 @@ wire protocols, key derivation salts, and CLI interfaces are all acceptable.
|
||||
- Architecture: Jetpack Compose for UI, JNI for Rust integration
|
||||
- Types: Use explicit types for public APIs, leverage type inference for local variables
|
||||
- Slint: Prefer to create components built out of functional subcomponents with meaningful names, instead of long components with no internal structure. Prefer to define named constants instead of using the same color, spacing, etc. values in-situ. Don't define default values for properties unless necessary. Prefer to create text elements that have copy-able text; as of Slint 1.16 the best way to do this is by using the TextInput component with read-only: true.
|
||||
- When displaying hex-encoded hashes, do not truncate the hash
|
||||
|
||||
# VCS Workflow
|
||||
- This project uses Jujutsu (jj) with a git backend. Prefer `jj` commands over
|
||||
|
||||
@@ -350,11 +350,11 @@ fn create_blobs_display(blob_refs: &[BlobRef]) -> Vec<DocumentItemDisplay> {
|
||||
.iter()
|
||||
.map(|blob_ref| {
|
||||
let size = format_bytes(blob_ref.size_bytes);
|
||||
let hash_prefix = &blob_ref.blob_hash.to_string()[..12];
|
||||
let hash = blob_ref.blob_hash.to_string();
|
||||
DocumentItemDisplay {
|
||||
item_type: blob_ref.role.type_name().into(),
|
||||
modified_at: "".into(),
|
||||
summary: format!("{size} · {hash_prefix}…").into(),
|
||||
summary: format!("{size} · {hash}").into(),
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
|
||||
@@ -132,14 +132,14 @@ component ItemSection inherits VerticalBox {
|
||||
color: Theme.text-primary;
|
||||
}
|
||||
|
||||
if item.summary != "": Text {
|
||||
if item.summary != "": TextInput {
|
||||
read-only: true;
|
||||
text: item.summary;
|
||||
font-size: Theme.font-text-sm;
|
||||
color: Theme.text-input;
|
||||
wrap: word-wrap;
|
||||
width: 100%;
|
||||
max-height: 60px;
|
||||
overflow: elide;
|
||||
single-line: false;
|
||||
}
|
||||
|
||||
if item.modified-at != "": Text {
|
||||
|
||||
Reference in New Issue
Block a user