Skip to content

Commit

Permalink
sticked => stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 21, 2024
1 parent 8609c01 commit 936c239
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions history.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@
* More respect labels of menu commands in the context menu on blank area of the tab bar.
* Update `zh_CN` locale by [NightSharp](https://github.com/NightSharp). Thanks!
- 4.0.1 (2024.3.8)
* Tabs containing sticky tabs are kept expanded when another tree is expanded, even if those tabs are sticked via API.
* Tabs containing sticky tabs are kept expanded when another tree is expanded, even if those tabs are stuck via API.
- 4.0 (2024.3.7)
* Improved performance on cases with large number of tabs. Now tabs only in the viewport are rendered.
* Pinned tabs and unpinned (normal) tabs are now placed under separate container elements: `#pinned-tabs-container > .tabs.pinned` and `#normal-tabs-container > .virtual-scroll-container > .tabs.normal`.
* Each rendered tab element now has `data-index` attribute corresponding to [`tabs.Tab.index`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab#index).
* Due to this design change, customization with CSS `counter` won't be work as expected anymore. You'll need to create something helper addon to do such customizations.
* Introduce new context menu commands and other triggers to stick arbitrary tabs to edges of the tab bar. It is similar to "Pin/Unpin Tab" but sticked tab keeps its tree.
* Introduce new context menu commands and other triggers to stick arbitrary tabs to edges of the tab bar. It is similar to "Pin/Unpin Tab" but stuck tab keeps its tree.
* Indicate sharing state of tabs (camera, microphone and/or screen) with icons.
* Show dropshadow before normal tabs when the tab bar is scrolled.
* Show dropshadow after normal tabs when the tab bar is not fully scrolled.
Expand All @@ -153,7 +153,7 @@
* Introduce new values of [`states`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#data-format) to know detection result determined by TST internally.
* Introduce new message types [`stick-tab`, `unstick-tab` and `toggle-sticky-state`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#control-sticky-state-of-tabs-at-tab-bar-edges) to control tabs' sticky state at tab bar edges.
* Introduce new message types [`register-auto-sticky-states` and `unregister-auto-sticky-states`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#set-locked-as-collapsed-state-of-tree) to stick tabs with specific state to tab bar adges automaitcally.
* Introduce a new notification type [`tab-sticky-state-changed`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#when-a-tab-is-sticked-or-unsticked-tofrom-tab-bar-edges) to observe a tab is sticked or unsticked.
* Introduce a new notification type [`tab-sticky-state-changed`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#when-a-tab-is-stuck-or-unstuck-tofrom-tab-bar-edges) to observe a tab is stuck or unstuck.
* [Introduce a new option `rendered:true` for the message types `get-tree` and `get-light-tree`, to get information only about rendered tabs.](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#when-one-or-more-tabs-are-renderedun-rendered)
* Support [bulk messaging to TST (sending multiple messages at once)](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#abstract) and [bulk messaging from TST (receiving multiple messages at once](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#bulk-messages-from-tst) for better performance.
* Add ability to [minimize tree item information contained in notification type messages](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#listening-of-notification-messages), to reduce messaging cost.
Expand Down
2 changes: 1 addition & 1 deletion history.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
* [`get-tree`などで得られるツリー項目の情報](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#data-format)について、TST内での判別結果に対応する情報を含めるようにした
* タブのタブバー端への貼り付け状態を制御するためのメッセージ型として[`stick-tab``unstick-tab``toggle-sticky-state`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#control-sticky-state-of-tabs-at-tab-bar-edges)を追加
* 特定の状態のタブを自動的にタブバー端へ貼り付けるためのメッセージ型として [`register-auto-sticky-states``unregister-auto-sticky-states`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#set-locked-as-collapsed-state-of-tree) を追加
* 新しい通知型の [`tab-sticky-state-changed`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#when-a-tab-is-sticked-or-unsticked-tofrom-tab-bar-edges) を追加し、タブの貼り付け状態の変化を監視できるようにした
* 新しい通知型の [`tab-sticky-state-changed`](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#when-a-tab-is-stuck-or-unstuck-tofrom-tab-bar-edges) を追加し、タブの貼り付け状態の変化を監視できるようにした
* [`get-tree``get-light-tree``rendered:true` オプションによってレンダリング済みのタブの情報だけを得られるようにした](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#when-one-or-more-tabs-are-renderedun-rendered)
* パフォーマンス向上のため、[複数のメッセージをまとめてTSTに送ったり](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#abstract)[TSTからのメッセージをまとめて受け取ったり](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#bulk-messages-from-tst)できるようにした
* [通知型メッセージから送られてくるツリー項目の情報を最小限の物にできるようにした](https://github.com/piroor/treestyletab/wiki/API-for-other-addons#listening-of-notification-messages)
Expand Down
6 changes: 3 additions & 3 deletions webextensions/common/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export default class Tab {
return this.states.has(Constants.kTAB_STATE_STICKY);
}

get sticked() {
get stuck() {
return this.element?.parentNode?.classList.contains('sticky-tabs-container');
}

Expand Down Expand Up @@ -2055,8 +2055,8 @@ export default class Tab {
ancestorTabIds: this.tab.$TST.ancestorIds,
bundledTabId: this.tab.$TST.bundledTabId,
};
if (this.sticked)
exportedTab.states.push(Constants.kTAB_STATE_STICKED);
if (this.stuck)
exportedTab.states.push(Constants.kTAB_STATE_STUCK);
if (configs.cacheAPITreeItems && light)
this.$exportedForAPI = exportedTab;
}
Expand Down
6 changes: 3 additions & 3 deletions webextensions/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const kTAB_STATE_GROUP_TAB = 'group-tab';
export const kTAB_STATE_NEW_TAB_COMMAND_TAB = 'newtab-command-tab';
export const kTAB_STATE_OPENED_FOR_SAME_WEBSITE = 'opened-for-same-website';
export const kTAB_STATE_STICKY = 'sticky';
export const kTAB_STATE_STICKED = 'sticked'; // virtual state
export const kTAB_STATE_STUCK = 'stuck'; // virtual state
export const kTAB_INTERNAL_STATES = new Set([ // TST specific states
'tab',
kTAB_STATE_LAST_ROW,
Expand All @@ -240,7 +240,7 @@ export const kTAB_INTERNAL_STATES = new Set([ // TST specific states
kTAB_STATE_FROM_FIREFOX_VIEW,
kTAB_STATE_OPENED_FOR_SAME_WEBSITE,
kTAB_STATE_STICKY,
kTAB_STATE_STICKED,
kTAB_STATE_STUCK,
]);
export const kTAB_TEMPORARY_STATES = new Set([ // states not trigger updating of cache
kTAB_STATE_CREATING,
Expand Down Expand Up @@ -271,7 +271,7 @@ export const kTAB_SAFE_STATES = new Set([ // exportable via API
kTAB_STATE_FROM_FIREFOX_VIEW,
kTAB_STATE_OPENED_FOR_SAME_WEBSITE,
kTAB_STATE_STICKY,
kTAB_STATE_STICKED,
kTAB_STATE_STUCK,
]);
export const kTAB_SAFE_STATES_ARRAY = Array.from(kTAB_SAFE_STATES);

Expand Down

0 comments on commit 936c239

Please sign in to comment.