Giter Site home page Giter Site logo

Finding a text in the page about mosaic HOT 6 CLOSED

mlajtos avatar mlajtos commented on May 31, 2024
Finding a text in the page

from mosaic.

Comments (6)

michalklempa avatar michalklempa commented on May 31, 2024 2

May I suggest some key binding to 'jump to next search result' and 'jump to previous?', what are the usual bindings on these (not n and N as in less :D)

from mosaic.

marc2332 avatar marc2332 commented on May 31, 2024

I am working on this in https://github.com/marc2332/mosaic.

So far:

  • Ctrl+F opens a floating search box ( that's my design, it can be obviously discussed)
  • Esc closes it
  • The floating box has a input where you can write and a button to close next to it

Result:

imagen

imagen

Ideas:

  • Add an option to search Up/Down
  • Add an option to toggle case sensitive

Note: I have never used recoil, but I am trying my best 👍🏻

from mosaic.

marc2332 avatar marc2332 commented on May 31, 2024

Yep!

In Firefox these shortcuts are (pretty bad in my opinion):
Ctrl+G -> Next result
Shift F3 -> Previous result

I would definitely use ones more friendly, specially for the 'previous' one. And also add some Up and Down arrows to do the same

from mosaic.

mlajtos avatar mlajtos commented on May 31, 2024

Hey @marc2332,

I tried your Find in Page implementation and it works quite okay. Go ahead and make a PR.

Don't worry about Recoil.js, I jumped on it because I wanted to try out something new, so we are in the same boat being beginners. 🙂 So far I can see it has shortcomings (especially for this project 😅), but I hope they will be worked out as we go further.

About keybindings – I use Enter for next and Shift-Enter for previous. These only makes sense. At least for me.

Btw nice touch adding animation. 🙂

from mosaic.

marc2332 avatar marc2332 commented on May 31, 2024

The PR is #12 Feel free to review it ^^

from mosaic.

mlajtos avatar mlajtos commented on May 31, 2024

Fixed by #14

from mosaic.

Related Issues (20)

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.