Skip to content

Conversation

@pkasila
Copy link
Member

@pkasila pkasila commented Mar 22, 2022

Description

  • Removed fixedSize from StatusBranchPicker, so now it can shrink Text inside of it instead of messing the whole UI up
  • Added ScrollView to BreadcrumbView

Releated Issue

Checklist (for drafts):

  • I read and understood the contributing guide as well as the code of conduct
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • Review requested

Screenshots (if appropriate):

image

image

@pkasila pkasila requested review from 0xWDG and austincondiff March 22, 2022 19:54
@austincondiff
Copy link
Collaborator

austincondiff commented Mar 22, 2022

Sorry, I thought I had updated the title of my issue. Initially I thought this might be what Xcode did (scroll horizontally) but look at the video in #182. That is how we need to handle it as well. I am okay with this being a quick fix though, but we need to do this instead either now or in the future.

@0xWDG
Copy link
Collaborator

0xWDG commented Mar 22, 2022

Sorry, I thought I had updated the title of my issue. Initially I thought this might be what Xcode did (scroll horizontally) but look at the video in #182. That is how we need to handle it as well. I am okay with this being a quick fix though, but we need to do this instead either now or in the future.

I Agree, the "temporary" workaround looks good to me!

Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

@pkasila Can you reopen #182 and comment on it about this temporary fix so that we are tracking this? Just a word of caution, in my experience, if this doesn't get done sooner rather than later we will move on and forget about this. Just be aware.

@lukepistrol
Copy link
Member

please fix conflicts

@lukepistrol lukepistrol added bug Something isn't working UI This is UI related labels Mar 22, 2022
}
.menuStyle(.borderlessButton)
.fixedSize()
.onHover { isHovering($0) }
Copy link
Member

@lukepistrol lukepistrol Mar 23, 2022

Choose a reason for hiding this comment

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

this change can be omitted since it was already fixed in #196

Conflicts:
	CodeEdit/WorkspaceView.swift
	CodeEditModules/Modules/StatusBar/src/StatusBarItems/StatusBarBranchPicker.swift
@lukepistrol lukepistrol merged commit c9ae30a into CodeEditApp:main Mar 23, 2022
xinix909 pushed a commit to xinix909/CodeTransfer that referenced this pull request Sep 7, 2024
### Description

Implements bracket/pair highlighting as described in CodeEditApp#67. Adds a few
functions to `STTextViewController`:
- `highlightSelectionPairs()`
- Highlights selection pairs from the current selection. This is called
whenever the selection is updated and handles determining whether or not
the selection highlight should be applied. It makes use of
`findClosingPair(_ close: String, _ open: String, from: Int, limit: Int,
reverse: Bool) -> Int?` to determine the indices of the opening and
closing pairs.
- `highlightRange(_ range: NSTextRange, scrollToRange: Bool = false)`
- Applies a highlight to the given range, determined by the
`bracketPairHighlight` property. Also handles removing animated layers
if needed (as in the case of the `flash` highlight type).

There are two highlight types:
- Flash: Flashes a yellow rectangle below the given range with an
animation. The highlight disappears after 0.75s. This is modeled closely
to the Xcode version.
- Bordered: Adds a border around both the opening and closing bracket
pair. These borders only disappear when the selection changes.
- Underline: Adds an underline to both the opening and closing bracket
pair. These borders only disappear when the selection changes.
All highlight types are documented in the `BracketPairHighlight` enum.

Highlighted pairs are the same set of pairs used for the pair
autocomplete filter:
- `{` `}`
- `[` `]`
- `<` `>`
- `(` `)`

This feature can also be disabled by setting the `bracketPairHighlight`
property on `CodeEditTextView` to `nil`.

### Related Issues

* closes CodeEditApp#67

### Checklist

<!--- Add things that are not yet implemented above -->

- [x] I read and understood the [contributing
guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md)
as well as the [code of
conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

### Screenshots

Box highlight:
<img width="210" alt="Screenshot 2023-05-07 at 8 07 11 PM"
src="https://user-images.githubusercontent.com/35942988/236713451-d74edbbe-b41c-45c4-98e2-bfcef9e84fd6.png">

Flash highlight:


https://user-images.githubusercontent.com/35942988/236056573-ce5f8e61-5ed5-4799-a054-0591cfc7653b.mov

Underline highlight with red color:

<img width="250" alt="Screenshot 2023-05-08 at 2 15 27 PM"
src="https://user-images.githubusercontent.com/35942988/236912499-68665a38-34d2-44fd-b62d-c7ef2f130c7e.png">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working UI This is UI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Sidebar moved to far left

4 participants