Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 2ec14b8

Browse files
committed
changelog
1 parent eca7826 commit 2ec14b8

File tree

4 files changed

+52
-30
lines changed

4 files changed

+52
-30
lines changed

docs/docs/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## 1.7.1
22
### Improved
33
- Now select source tags will be ordered alphabetically and the number of tags will be shown. [ISSUE#76](https://github.com/RafaelGB/obsidian-db-folder/issues/76)
4+
## Visual
5+
- Tag options supports dark mode [PR](https://github.com/RafaelGB/obsidian-db-folder/pull/133)[ISSUE#124](https://github.com/RafaelGB/obsidian-db-folder/issues/124) [artisticat1](https://github.com/artisticat1)
6+
- Freeze column gap fixed [ISSUE#120](https://github.com/RafaelGB/obsidian-db-folder/issues/120) [artisticat1](https://github.com/artisticat1)
7+
- Improvements of compact row mode [artisticat1](https://github.com/artisticat1)
48
### No longer broken
59
- More that one filter can be applied again to the same source. [ISSUE#113](https://github.com/RafaelGB/obsidian-db-folder/issues/113)
610
- You can not order by tags because was not prepared to do it yet (crashed). [ISSUE#119](https://github.com/RafaelGB/obsidian-db-folder/issues/119)

src/components/HeaderMenu.tsx

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { ColumnModal } from "./modals/ColumnModal";
2323
import { HeaderMenuProps } from "cdm/HeaderModel";
2424
import header_action_button_section from "components/headerActions/HeaderActionButtonSection";
2525
import { HeaderActionResponse } from "cdm/HeaderActionModel";
26+
import header_action_types_section from "components/headerActions/HeaderActiontypesSection";
2627

2728
const HeaderMenu = (headerMenuProps: HeaderMenuProps) => {
2829
/** state of width columns */
@@ -80,9 +81,8 @@ const HeaderMenu = (headerMenuProps: HeaderMenuProps) => {
8081
/**
8182
* Array of action buttons asociated to the header
8283
*/
83-
const initButtons: any[] = [];
8484
let headerActionResponse: HeaderActionResponse = {
85-
buttons: initButtons,
85+
buttons: [],
8686
headerMenuProps: headerMenuProps,
8787
hooks: {
8888
setSortBy: setSortBy,
@@ -93,11 +93,26 @@ const HeaderMenu = (headerMenuProps: HeaderMenuProps) => {
9393
setKeyState: setkeyState,
9494
},
9595
};
96-
headerActionResponse = header_action_button_section.run(headerActionResponse);
96+
const headerButtons =
97+
header_action_button_section.run(headerActionResponse).buttons;
9798

9899
/**
99100
* Array of type headers available to change the data type of the column
100101
*/
102+
headerActionResponse = {
103+
buttons: [],
104+
headerMenuProps: headerMenuProps,
105+
hooks: {
106+
setSortBy: setSortBy,
107+
setExpanded: setExpanded,
108+
setColumnWidthState: setColumnWidthState,
109+
columnWidthState: columnWidthState,
110+
keyState: keyState,
111+
setKeyState: setkeyState,
112+
},
113+
};
114+
const typesTest =
115+
header_action_types_section.run(headerActionResponse).buttons;
101116
const types = [
102117
{
103118
onClick: (e: any) => {
@@ -177,22 +192,8 @@ const HeaderMenu = (headerMenuProps: HeaderMenuProps) => {
177192
icon: <CalendarTimeIcon />,
178193
label: MetadataLabels.CALENDAR_TIME,
179194
},
180-
,
181-
{
182-
onClick: (e: any) => {
183-
dispatch({
184-
type: ActionTypes.UPDATE_COLUMN_TYPE,
185-
columnId: column.id,
186-
dataType: DataTypes.CHECKBOX,
187-
});
188-
setShowType(false);
189-
setExpanded(false);
190-
},
191-
icon: <TaskIcon />,
192-
label: DataTypes.CHECKBOX,
193-
},
194195
];
195-
196+
types.push(...typesTest);
196197
const typePopper = usePopper(typeReferenceElement, typePopperElement, {
197198
placement: "right",
198199
strategy: "fixed",
@@ -382,7 +383,7 @@ const HeaderMenu = (headerMenuProps: HeaderMenuProps) => {
382383
padding: "4px 0px",
383384
}}
384385
>
385-
{headerActionResponse.buttons.map((button) => (
386+
{headerButtons.map((button) => (
386387
<div
387388
key={button.label}
388389
className="menu-item sort-button"

src/components/headerActions/HeaderActiontypesSection.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ import { HeaderActionResponse } from "cdm/HeaderActionModel";
22
import { AbstractChain, AbstractHandler } from "patterns/AbstractFactoryChain";
33
import CheckboxTypeHandlerAction from "components/headerActions/handlers/types/CheckboxTypeHeaderAction";
44
class HeaderActionTypesSection extends AbstractChain<HeaderActionResponse> {
5-
src/.tsx
65
protected customHandle(abstractResponse: HeaderActionResponse): HeaderActionResponse {
7-
return abstractResponse;
8-
}
6+
return abstractResponse;
7+
}
98

10-
protected getHandlers(): AbstractHandler < HeaderActionResponse > [] {
11-
return [
12-
new CheckboxTypeHandlerAction
13-
];
14-
}
9+
protected getHandlers(): AbstractHandler<HeaderActionResponse>[] {
10+
return [
11+
new CheckboxTypeHandlerAction()
12+
];
13+
}
1514
}
1615

1716
const header_action_types_section = new HeaderActionTypesSection();

src/components/headerActions/handlers/types/CheckboxTypeHeaderAction.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,32 @@ import ArrowUpIcon from "components/img/ArrowUp";
66
import ArrowDownIcon from "components/img/ArrowDown";
77
import React from "react";
88
import { ActionTypes, DataTypes } from "helpers/Constants";
9+
import TaskIcon from "components/img/TaskIcon";
910

1011
export default class CheckboxTypeHandlerAction extends AbstractHeaderAction {
1112
globalHeaderActionResponse: HeaderActionResponse;
1213
handle(headerActionResponse: HeaderActionResponse): HeaderActionResponse {
1314
this.globalHeaderActionResponse = headerActionResponse;
14-
const { column } =
15-
this.globalHeaderActionResponse.headerMenuProps.headerProps;
16-
15+
this.addCheckboxType();
1716
return this.goNext(this.globalHeaderActionResponse);
1817
}
18+
private addCheckboxType() {
19+
const { hooks } = this.globalHeaderActionResponse;
20+
const { initialState, column } =
21+
this.globalHeaderActionResponse.headerMenuProps.headerProps;
22+
const checkBoxType = {
23+
onClick: (e: any) => {
24+
initialState.dispatch({
25+
type: ActionTypes.UPDATE_COLUMN_TYPE,
26+
columnId: column.id,
27+
dataType: DataTypes.CHECKBOX,
28+
});
29+
hooks.setShowType(false);
30+
hooks.setExpanded(false);
31+
},
32+
icon: <TaskIcon />,
33+
label: DataTypes.CHECKBOX,
34+
};
35+
this.globalHeaderActionResponse.buttons.push(checkBoxType);
36+
}
1937
}

0 commit comments

Comments
 (0)