Giter Site home page Giter Site logo

atom-select-list's Introduction

Atom

Build status

Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

Atom is a hackable text editor for the 21st century, built on Electron, and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.

Atom

Atom Screenshot

Visit atom.io to learn more or visit the Atom forum.

Follow @AtomEditor on Twitter for important announcements.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

Documentation

If you want to read about using Atom or developing packages in Atom, the Atom Flight Manual is free and available online. You can find the source to the manual in atom/flight-manual.atom.io.

The API reference for developing packages is also documented on Atom.io.

Installing

Prerequisites

macOS

Download the latest Atom release.

Atom will automatically update when a new release is available.

Windows

Download the latest Atom installer. AtomSetup.exe is 32-bit. For 64-bit systems, download AtomSetup-x64.exe.

Atom will automatically update when a new release is available.

You can also download atom-windows.zip (32-bit) or atom-x64-windows.zip (64-bit) from the releases page. The .zip version will not automatically update.

Using Chocolatey? Run cinst Atom to install the latest version of Atom.

Linux

Atom is only available for 64-bit Linux systems.

Configure your distribution's package manager to install and update Atom by following the Linux installation instructions in the Flight Manual. You will also find instructions on how to install Atom's official Linux packages without using a package repository, though you will not get automatic updates after installing Atom this way.

Archive extraction

An archive is available for people who don't want to install atom as root.

This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit, but should be compatible with other Linux distributions.

  1. Install dependencies (on Ubuntu):
sudo apt install git libasound2 libcurl4 libgbm1 libgcrypt20 libgtk-3-0 libnotify4 libnss3 libglib2.0-bin xdg-utils libx11-xcb1 libxcb-dri3-0 libxss1 libxtst6 libxkbfile1
  1. Download atom-amd64.tar.gz from the Atom releases page.
  2. Run tar xf atom-amd64.tar.gz in the directory where you want to extract the Atom folder.
  3. Launch Atom using the installed atom command from the newly extracted directory.

The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases.

Building

Discussion

License

MIT

When using the Atom or other GitHub logos, be sure to follow the GitHub logo guidelines.

atom-select-list's People

Contributors

50wliu avatar aminya avatar ben3eee avatar darangi avatar daviwil avatar eeejay avatar iolsen avatar jarle avatar josa42 avatar kant avatar leroix avatar lexicalunit avatar mateusvahl avatar maxbrunsfeld avatar nshikov avatar sadick254 avatar t9md avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-select-list's Issues

Opening a second Select List reverts focus to editor

Prerequisites

Description

Opening a second Select List on top of another results in the Select List being unfocused, and reverts focus to the editor.

Steps to Reproduce

  1. Open Fuzzy Finder
  2. Open Command Palette without closing the Fuzzy Finder

Expected behavior:
Command Palette is focused - typing results in text in field.

Actual behavior:
Command Palette is not focused - typing does not result in text in field.
Typing results in text on currently opened file.

Reproduces how often:
100% reproduce rate from a small number of tests.

Versions

macOS 10.11.5

Atom : 1.16.0-beta0
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0

apm 1.16.1
npm 3.10.5
node 6.9.5 x64
python 2.7.10
git 2.10.1

select list toggle time is long for very big lists

In my case, the fuzzy finder loads a project with 200k files.
When I press ctrl+p, it takes several seconds for the select list to appear, and if I blur the list, it takes several more seconds for it to disappear. In the meanwhile, the UI hangs.

I narrowed this down to computeItems. It takes almost 3 seconds to splice a very large array into the allowed maxResults size.

Support configurable auto-selection

I'd like to use this component, but I need to be able to configure it to select nothing by default. When filtering it should still filter items just the same, but just don't automatically select the first item in the list after each filtering process has completed. Pressing enter when there are items in the list, but none are selected, should result in didConfirmEmptySelection() being called.

My existing use case for this is a list of existing documents. While typing out a query, it filters the document list to show relevant matches. However, as long as no document is yet selected, confirmation will create a new document with name set to the current query filter. It's this last part that can't be done with atom-select-list as it's currently written.

Rollup Warning: This expression is not constructable

Prerequisites

None of the prerequisites applies to this bug

Description

Since upgrading to v0.8.0, Rollup reports the following warning when trying to compile a script that instantiates the SelectList class:

(!) Plugin typescript: @rollup/plugin-typescript TS2351: This expression is not constructable.
Type 'typeof import(".../node_modules/atom-select-list/lib/select-list-view")' has no construct signatures.

Steps to Reproduce

  1. Add [email protected] as a package dependency
  2. Instantiate the class new SelectList() in a package written in TypeScript
  3. Build using Rollup

Versions

Atom    : 1.54.0
Electron: 6.1.12
Chrome  : 76.0.3809.146
Node    : 12.4.0

$ apm --version
apm  2.5.2
npm  6.14.8
node 12.4.0 x64
atom 1.54.0
python 2.7.16
git 2.30.1

Expose a setQuery method in SelectListView

Hi guys,

I feel it would be useful to provide a setQuery method to set the text in the internal TextEditor. Currently this can be done using

selectListView.refs.queryEditor.setText

This is not a good way to do it as it makes assumptions on the internals of the class.

Need
This would provide more flexibility in how the functionality of select view can be used.

Let me know what you guys think.

Thanks,
Sanketh

Add a README and CHANGELOG

I had to dig through command-palette package to see this package's API to use it in linter. Having a README with an API and a basic example would be nice

Having a CHANGELOG would help a lot with version upgrades (we won't have to read commit history anymore)

Add support for as-you-type autocomplete

As it's currently implemented, there's no evident event hook that could be used to support an autocomplete feature. Initially I tried to use didChangeQuery(). I got the TextEditor model out of the SelectList via selectList.refs.queryEditor, then I intended to do something like:

item = whatever() // the item we want to autocomplete to
editor.setText(item.title)
editor.selectLeft(item.title.length - query.length)

But of course using editor.setText() here triggers didChangeQuery() and causes an infinite loop. More than that though, it also triggers a filter process for the autocompleted item's text :(

I tried to work around it by using some state to make the next didChangeQuery() and filter() calls into no-ops after doing an autocompletion but it was really janky and slow and I just couldn't get it to work right. This seems like it would be better implemented within atom-select-list somehow.

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.