Giter Club home page Giter Club logo

obsidian-mobile-suggester-helper's Introduction

Mobile Suggester Helper

This plugin is designed to help get a similar experience for selecting files from the wiki link suggester.

There are 3 commands that are added by the plugin that help with making sure you can navigate through the selection list and select the desired file name.

Why is this useful?

It may not for your use case. I have a setting enabled where all my links should be markdown links. This means that on mobile when I select the file from the dropdown, the typical behavior is to convert that link straight to a markdown link. This works pretty good if you do not plan on referencing a subset of the document.

In my case, I have multiple files with the same name, but they are in different folders. I often link to a subset of these documents via their headings. Well, if I want to do this like on the desktop, it is not possible when you need to reference a file that is not the first file in the list because selecting it concerts the link straight to a markdown link. So to get around this, I needed to add a couple of commands to allow me to modify which entry in the suggester is suggested (up and down options) and then select an option from the dropdown.

How to use

First install the plugin manually. Once that is done, I find it easiest to go ahead and add the new commands to the mobile toolbar. Once that is done, I use the up and down arrows in the mobile toolbar to help me. Then once it is on the file that I want to select, I use the checkmark inside the circle to select it. Once a file is selected, I can proceed with typing # or ^ and then use the suggester from there to select what I need to.

Commands

Name Action
mobile-suggester-helper-move-selector-down Move the selected item down one in the suggester.
mobile-suggester-helper-move-selector-up Move the selected item up one in the suggester.
mobile-suggester-helper-select-heading Select the highlighted item in the suggester.

Contributing

  • Clone this repo.
  • Make sure your NodeJS is at least v16 (node --version).
  • npm i to install dependencies.
  • npm run dev to start compilation in watch mode.
  • Before committing make sure to run npm run lint

Manually installing the plugin

  • Copy over main.js and manifest.json to your vault VaultFolder/.obsidian/plugins/obsidian-mobile-suggester-helper/.

obsidian-mobile-suggester-helper's People

Contributors

pjkaufman avatar

Watchers

 avatar

obsidian-mobile-suggester-helper's Issues

Path not correctly generated for partial match file names

Initial checklist

Affected packages and versions

Latest

Link to runnable example

No response

Steps to reproduce

On mobile, open the wiki selector and search for a file that will have partial matches that do not match the text you are searching on (i.e. partial matches that the search text is not a substring for). If you select that file, it will end up with an odd string that does not match the expected value (I think it is caused by searching for highlighted text instead of just grabbing all display text for the div).

Expected behavior

The path should display as shown in the suggester.

Actual behavior

It seems to just grab the first highlighted character. This also is affecting files with a period in their name.

Runtime

Electron

Package manager

npm 8

OS

Linux

Build and bundle tools

esbuild

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.