Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fs_watcher.cljs #164

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6b889a8
Update fs_watcher.cljs
Bad3r Apr 11, 2023
122e89c
test 3x polling docker image
Bad3r Apr 11, 2023
6f683a4
add delay for file change check
Bad3r Apr 11, 2023
4dcce17
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r Apr 12, 2023
6a2e0a0
increase fs change check delay to 20 seconds
Bad3r Apr 12, 2023
5ef2859
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r Apr 13, 2023
12b88b3
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r Apr 15, 2023
f50d477
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r Apr 21, 2023
bbdfa53
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r Apr 26, 2023
41902ae
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r May 15, 2023
d531e55
Merge branch 'logseq:master' into test-fs-wrt-time
Bad3r May 31, 2023
07434e9
Merge remote-tracking branch 'upstream/master' into test-fs-wrt-time
Bad3r Jun 8, 2023
2fa053f
Merge remote-tracking branch 'upstream/master' into test-fs-wrt-time
Bad3r Jun 8, 2023
399134f
Merge remote-tracking branch 'upstream/master' into test-fs-wrt-time
Bad3r Jun 13, 2023
d42398f
chore(deps): upgrade codemirror to v5.65.13 (#162)
Bad3r Jul 13, 2023
e450b7a
chore(deps): upgrade Electron to v25.3.0 (#161)
Bad3r Jul 13, 2023
e019386
chore(deps): update branch (#163)
Bad3r Jul 13, 2023
b5f48b9
Merge branch 'master' into test-fs-wrt-time
Bad3r Jul 13, 2023
6c0ac69
Merge branch 'logseq:master' into master
Bad3r Jul 14, 2023
34bf75f
Enhance: Right sidebar [minor change] (#172)
Bad3r Jul 14, 2023
1db6153
Merge branch 'logseq:master' into master
Bad3r Jul 15, 2023
029e124
Merge branch 'master' into test-fs-wrt-time
Bad3r Jul 15, 2023
343c297
chore: update lock files
Bad3r Jul 15, 2023
774f7b7
Merge remote-tracking branch 'upstream/master'
Bad3r Jul 18, 2023
72eb312
chore: release 0.9.11
Bad3r Jul 19, 2023
8d3d449
Chore: release 0.9.11
Bad3r Jul 19, 2023
c992725
chore(release): 0.9.13
Bad3r Aug 4, 2023
fe02ead
Squashed commit of the following:
Bad3r Sep 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository_owner }}/logseq-webapp:latest
tags: ghcr.io/bad3r/logseq-webapp:testing
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling with custom config file
uses: crate-ci/typos@v1.13.10
uses: crate-ci/typos@v1.16.8
with:
config: ./typos.toml

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | \
WORKDIR /data

# build Logseq static resources
RUN git clone -b master https://github.com/logseq/logseq.git .
RUN git clone -b test-fs-wrt-time https://github.com/bad3r/logseq-dev.git .

RUN yarn config set network-timeout 240000 -g && yarn install

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.logseq.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 66
versionName "0.9.13"
versionCode 70
versionName "0.9.17"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
1 change: 1 addition & 0 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const config: CapacitorConfig = {
appName: 'Logseq',
bundledWebRuntime: false,
webDir: 'public',
loggingBehavior: 'debug',
plugins: {
SplashScreen: {
launchShowDuration: 500,
Expand Down
2 changes: 1 addition & 1 deletion deps/common/src/logseq/common/path.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
;; compat
(defn basename
[path]
(let [path (string/replace path #"/$" "")]
(let [path (string/replace path #"/+$" "")]
(filename path)))

(defn dirname
Expand Down
6 changes: 3 additions & 3 deletions deps/shui/src/logseq/shui/context.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
:config app-config
;; Until components are converted over, they need to fallback to the old inline function
;; Wrap the old inline function to allow for interception, but fallback to the old inline function
:inline-block (inline->inline-block inline block-config)
:inline-block (inline->inline-block inline block-config)
:map-inline-block (inline->map-inline-block inline block-config)
;; Currently frontend component are provided an object map containin at least the following keys:
;; Currently frontend component are provided an object map containing at least the following keys:
;; These will be passed through in a whitelisted fashion so as to be able to track the dependencies
;; back to the core application
;; TODO: document the following
:block (:block block-config) ;; the db entity of the current block
:block? (:block? block-config)
:blocks-container-id (:blocks-container-id block-config)
:editor-box (:editor-box block-config)
:id (:id block-config)
:id (:id block-config)
:mode? (:mode? block-config)
:query-result (:query-result block-config)
:sidebar? (:sidebar? block-config)
Expand Down
2 changes: 1 addition & 1 deletion docs/Build LogSeq Desktop for windows on Ubuntu.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Building Logseq Desktop app for Windows on Ubuntu
## Intro
My Logseq dev machine is on Ubuntu 18.x and my production machine is running Windows 10, I needed a way to compile the Logseq desktop APP for Windows.
I tired & failed to make the "build" run on my windows machine but I did, however, succeed in letting my Ubuntu machine make Windows x64 files
I tried & failed to make the "build" run on my windows machine but I did, however, succeed in letting my Ubuntu machine make Windows x64 files
## Pre-requisites
These are the steps I took to make it work on my Ubuntu machine, sharing them hoping it helps someone else. I assume you have all the basic pre-requisites for Logseq, if not you can find them at https://github.com/logseq/logseq#1-requirements
1. clone Logseq repo if you haven't already
Expand Down
6 changes: 3 additions & 3 deletions docs/accessibility.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
- Accessibility is a vague term, which is why it is usually misunderstood. It is not just about people with with specific disabilities. You can read more about [what is accessibility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/What_is_accessibility#so_what_is_accessibility) and [diverse abilities and barriers](https://www.w3.org/WAI/people-use-web/abilities-barriers/).
- Accessibility is a vague term, which is why it is usually misunderstood. It is not just about people with specific disabilities. You can read more about [what is accessibility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/What_is_accessibility#so_what_is_accessibility) and [diverse abilities and barriers](https://www.w3.org/WAI/people-use-web/abilities-barriers/).
- ## Web Content Accessibility Guidelines
- [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/) (Web Content Accessibility Guidelines) is the international standard for web content accessibility, developed by [W3C](https://www.w3.org/). Logseq is a web application, so conforming with WCAG should be our first priority. In general, there is no simple way to determine if a website is accessible or not, but WCAG can help us make the tool usable by as many people as possible.
- ## Levels of conformance
- There are three levels of conformance defined by WCAG
- Level **A** is the minimum level.
- Level **AA** includes all Level A and AA requirements.
- Level **AAA** includes all Level A, AA, and AAA requirements.
- Many organizations strive to meet Level AA. The reason behind this decision, is that in some cases AAA standard is too strict. That does't mean that triple-A issues should be disregarded. On the contrary, all of them should be handled if possible.
- Many organizations strive to meet Level AA. The reason behind this decision, is that in some cases AAA standard is too strict. That doesn't mean that triple-A issues should be disregarded. On the contrary, all of them should be handled if possible.
- We can also provide alternative options in order to conform with AAA standards. For instance, our default themes can aim for AA, but we can provide a high-contrast theme that aims for AAA. Providing [alternative versions](https://www.w3.org/WAI/GL/2007/05/alternate-versions.html) with different levels of conformance is permitted according to WCAG, if there is an accessible way to reach those alternatives.
- ## Simple development guidelines
- Use semantically correct markup whenever possible. Every time you are about to decide which html tag you are going to use, choose the one that behaves the way you want it. For example, let's say you want to create an element that looks like plain text, but triggers an action on click. Usually, the best approach would be to create a `<button>` and make it look like a `<span>` using css. If you use a `span`, you will also have to override other html attributes like `tabindex` and `role` to make the element behave like a button. This is almost always a bad sign, and should be avoided. If you use the appropriate html element, the browser will be able to properly handle it.
Expand All @@ -18,7 +18,7 @@
- There is a [huge list of tools](https://www.w3.org/WAI/ER/tools/) that can help us test our application. Most of them use [axe-core](https://github.com/dequelabs/axe-core) internally. There are [browser extensions](https://www.deque.com/axe/browser-extensions/) based on axe, a [VSCode Linter Plugin](https://marketplace.visualstudio.com/items?itemName=deque-systems.vscode-axe-linter) and also [multiple community projects](https://github.com/dequelabs/axe-core/blob/develop/doc/projects.md#community-projects).
- Basic accessibility testing could be integrated into our CI, by using the appropriate axe package (e.g. [@axe-core/playwright](https://github.com/dequelabs/axe-core-npm/blob/develop/packages/playwright/README.md))
- ## Manual testing
- In theory, all of the cases described by WCAG should be testable. In practice, there are issues that can't be replicated by code. Also, manual accessibility testing would help us have a better understanding of the difficulties that certain people might encounter. Even if the all the individual cases pass the tests, the overall navigation might be nonsensical.
- In theory, all of the cases described by WCAG should be testable. In practice, there are issues that can't be replicated by code. Also, manual accessibility testing would help us have a better understanding of the difficulties that certain people might encounter. Even if all the individual cases pass the tests, the overall navigation might be nonsensical.
- ### Manual accessibility testing musts
- Keyboard-only navigation
- Screen reader testing and compatibility
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing-to-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In order to run the commands in this doc, you will need to install
## Where to Contribute

Language translations are under,
[src/resources/dicts/](https://github.com/logseq/logseq/blob/master/src/resources/dicts/) with each language having it's own file. For example, the es locale is in `es.edn`.
[src/resources/dicts/](https://github.com/logseq/logseq/blob/master/src/resources/dicts/) with each language having its own file. For example, the es locale is in `es.edn`.

## Language Overview

Expand Down Expand Up @@ -83,7 +83,7 @@ Almost all translations are small. The only exceptions to this are the keys `:tu
### Editing Tips

* Some translations may include punctuation like `:` or `!`. When translating them, please use the punctuation that makes the most sense for your language as you don't have to follow the English ones.
* Some translations may include arguments/interpolations e.g. `{1}`. If you see them in a translation, be sure to include them. These arguments are substituted in the string and are usually used something the app needs to calculate e.g. a number. See [these docs](https://github.com/tonsky/tongue#interpolation) for more examples.
* Some translations may include arguments/interpolations e.g. `{1}`. If you see them in a translation, be sure to include them. These arguments are substituted in the string and are usually used for something the app needs to calculate e.g. a number. See [these docs](https://github.com/tonsky/tongue#interpolation) for more examples.
* Rarely, a translation may need to translate formatted text by returning [hiccup-style HTML](https://github.com/weavejester/hiccup#syntax). In this case, a Clojure function is the recommended approach. For example, a function translation would look like `(fn [] [:div "FOO"])`. See `:on-boarding/main-title` for an example.
## Fix Mistakes

Expand All @@ -105,4 +105,4 @@ To add a new language:
* Add an entry to `frontend.dicts/languages`
* Create a new file under `src/resources/dicts/` and name the file the same as the locale e.g. zz.edn for a hypothetical zz locale.
* Add an entry in `frontend.dicts/dicts` referencing the file you created.
* Then start translating for your language and adding entries in your language's EDN file using the `bb lang:missing` workflow.
* Then start translating for your language and adding entries in your language's EDN file using the `bb lang:missing` workflow.
6 changes: 3 additions & 3 deletions docs/develop-logseq-on-mobile.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
```
- Working directory: Logseq root directory
- Run `yarn && yarn app-watch` from the logseq project root directory in terminal.
- Run `npx cap sync ios` in another termimal to copy web assets from public to *ios/App/App/public*, and create *capacitor.config.json* in *ios/App/App*, and update iOS plugins.
- Run `npx cap sync ios` in another terminal to copy web assets from public to *ios/App/App/public*, and create *capacitor.config.json* in *ios/App/App*, and update iOS plugins.
- Connect your iOS device to MacBook.
- Run `npx cap open ios` to open Logseq project in Xcode, and build the app there.

Expand Down Expand Up @@ -70,13 +70,13 @@ or, you can run `bb release:ios-app` to do those steps with one command.
}
```
- Run `yarn && yarn app-watch` from the logseq project root directory in terminal.
- Run `npx cap sync android` in another termimal.
- Run `npx cap sync android` in another terminal.
- Run `npx cap run android` to install app into your device.

or, you can run `bb dev:android-app` to do those steps with one command if you are on macOS.

Then,
- In Android Studio, open **Tools** -> **AVD Manager** to create Android Virtual Device (AVD), and lanuch it in the emulator.
- In Android Studio, open **Tools** -> **AVD Manager** to create Android Virtual Device (AVD), and launch it in the emulator.
- In Android Studio, open **Run** -> **Run** to run Logseq.
- After logseq startup in Android virtual device, repl should be able to connect
- For browser console print and devtool remote debug, open chrome, type url chrome://inspect/#devices, you should see your device there, click inspect
Expand Down
25 changes: 15 additions & 10 deletions docs/develop-logseq-on-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

This is a guide on setting up Logseq development dependencies on Windows. Once these dependencies are installed, you can follow the [develop-logseq](develop-logseq.md) docs for build instructions.

## [scoop](https://scoop.sh/)

Scoop provides a `clojure.exe` shim which works in Command Prompt and Powershell windows.

```
scoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure
scoop bucket add extras
scoop bucket add java
scoop install java/openjdk clj-deps babashka leiningen nodejs-lts
```

## Winget

Winget is a package manager installed by default on windows.
Expand All @@ -19,6 +30,10 @@ An installer for clojure is available from [casselc/clj-msi](https://github.com/

## [chocolatey](https://chocolatey.org/)

Chocolatey installs Clojure as a PowerShell module and alias, and does not provide `clojure` for `cmd.exe`.

[@andelf has written a wrapper utility](https://github.com/andelf/clojure-cli) which you can install with `cargo install --git https://github.com/andelf/clojure-cli.git` instead.

```
choco install nvm
nvm install 18
Expand All @@ -29,16 +44,6 @@ choco install javaruntime
choco install clojure
```


## [scoop](https://scoop.sh/)

```
scoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure
scoop bucket add extras
scoop bucket add java
scoop install java/openjdk clojure clj-deps babashka leiningen nodejs-lts
```

## Troubleshooting

### Configuring a proxy for internet access
Expand Down
8 changes: 4 additions & 4 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.9.13;
MARKETING_VERSION = 0.9.18;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -546,7 +546,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.9.13;
MARKETING_VERSION = 0.9.18;
PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
Expand All @@ -571,7 +571,7 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 0.9.13;
MARKETING_VERSION = 0.9.18;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq.ShareViewController;
Expand All @@ -598,7 +598,7 @@
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 0.9.13;
MARKETING_VERSION = 0.9.18;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.logseq.logseq.ShareViewController;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
1 change: 1 addition & 0 deletions libs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dependencies": {
"csstype": "3.1.0",
"debug": "4.3.4",
"deepmerge": "4.3.1",
"dompurify": "2.3.8",
"eventemitter3": "4.0.7",
"fast-deep-equal": "3.1.3",
Expand Down
15 changes: 10 additions & 5 deletions libs/src/LSPlugin.caller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,18 +243,23 @@ class LSPluginCaller extends EventEmitter {
let { width, height, left, top, vw, vh } = mainLayoutInfo

left = Math.max(left, 0)
left = (typeof vw === 'number') ?
`${Math.min(left * 100 / vw, 99)}%` : `${left}px`
left =
typeof vw === 'number'
? `${Math.min((left * 100) / vw, 99)}%`
: `${left}px`

// 45 is height of headbar
top = Math.max(top, 45)
top = (typeof vh === 'number') ?
`${Math.min(top * 100 / vh, 99)}%` : `${top}px`
top =
typeof vh === 'number'
? `${Math.min((top * 100) / vh, 99)}%`
: `${top}px`

Object.assign(cnt.style, {
width: width + 'px',
height: height + 'px',
left, top
left,
top,
})
}
} catch (e) {
Expand Down
Loading
Loading