Repository navigation
Open a page's new tab beside the page that opened it - #295
Merged
Merged
Conversation
A target=_blank link (an image a page wraps in one), a shift-click, or a window.open without features opened another browser display in the active area and brought it to the front, so the page that asked seemed to turn into the image. The shell now names the opening page in browser_open (beside_display), and the core places the new display in the View area next to that page's area in Open to the side's order, else in a new area to its right, so the page stays in view. With no room for another area, or with the page gone, it opens where any page would.
…s placement in tests A page whose area has no neighbour holds the only area, so a split beside it always fits the area cap and only the display cap can refuse it, which a plain insert would hit too. The test now covers an address already shown and where a tab from a closed page lands, and the docs say what the code does.
…screen At the 1024-point window a runner's screen holds, the side panel shows one View area until it is expanded, as the first browser test does; the popup test now sizes its window the same way and expands the panel before it checks that the page and its new tab both show.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #282
Summary
브라우저 디스플레이에서 GitHub 본문 이미지처럼
target=_blank로 감싼 링크를 누르면, 새 탭이 같은 영역에 생겨 바로 앞으로 와서 원래 페이지가 이미지로 바뀐 것처럼 보였습니다.이제 페이지가 연 새 탭은 그 페이지 옆에 열립니다: 옆 View 영역이 있으면 그 영역의 새 탭으로, 없으면 오른쪽에 새 영역을 만들어서. 원래 페이지는 그대로 화면에 남습니다.
셸이
browser_open에 연 페이지(beside_display)를 넘기고, core가 Open to the side와 같은 순서(오른쪽, 왼쪽, 아래, 위)로 자리를 고릅니다.이미 보이는 주소면 그 디스플레이를 다시 보여 주고, 연 페이지가 닫혔으면 예전처럼 사용 중인 영역에 엽니다. 시프트 클릭과 features 없는
window.open도 같습니다.Review
herdr-core/src/runtime/view_areas.rs- runtime mutex 안의change_view_layout클로저. 새 분기는insert/split_new만 쓰고 상한 검사는 기존 그대로.Evidence
open이벤트가beside_display를 싣는 것을 단위 테스트로는 따로 확인하지 않음 (e2e가 결과로 확인).