This repository has been merged into http://github.com/bullet-train-co/bullet_train-core.
bullet-train-co / bullet_train-fields Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
This repository has been merged into http://github.com/bullet-train-co/bullet_train-core.
The options
field partial currently look like this when multiple: true
:
I'm currently working on a form where the list of options could be dozens, and I'd like to add a little link in the help text portion that allows people to "Select All".
Also, in my current example, the model might have some subset of options preselected when creating the model. Once the user selects more or deselects some or selects all, I'd like them to be presented with a little link that allows them to "Reset to Default".
Currently working on a form where the "options" presented could number in the dozens. When this is the case, I would love for the field to have the option of automatically breaking itself up into two or three columns, although remaining responsively in one column on mobile, etc.
We have file_field
, but it only supports a single file. Would love to add a separate field partial that supports multiple files.
I feel like I saw this with some other repos in the past, but now I'm only seeing it with bullet_train-fields
. I won't spend too much time trying to figure it out if it isn't high priority, but it just bothered me a bit:
> bundle exec rails test
/home/gazayas/work/bt/bullet_train-fields/lib/bullet_train/fields/engine.rb:5:in `block in <class:Engine>': undefined method `linked_gems' for BulletTrain:Module (NoMethodError)
BulletTrain.linked_gems << "bullet_train-fields"
^^^^^^^^^^^^
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `instance_exec'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:32:in `run'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:61:in `block in run_initializers'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `call'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/initializable.rb:60:in `run_initializers'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/application.rb:372:in `initialize!'
from /home/gazayas/work/bt/bullet_train-fields/test/dummy/config/environment.rb:5:in `<top (required)>'
from /home/gazayas/work/bt/bullet_train-fields/test/test_helper.rb:4:in `require_relative'
from /home/gazayas/work/bt/bullet_train-fields/test/test_helper.rb:4:in `<top (required)>'
from /home/gazayas/work/bt/bullet_train-fields/test/bullet_train/fields_test.rb:1:in `require'
from /home/gazayas/work/bt/bullet_train-fields/test/bullet_train/fields_test.rb:1:in `<top (required)>'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/test_unit/runner.rb:47:in `require'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/test_unit/runner.rb:47:in `block in load_tests'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/test_unit/runner.rb:47:in `each'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/test_unit/runner.rb:47:in `load_tests'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/test_unit/runner.rb:40:in `run'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/commands/test/test_command.rb:33:in `perform'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/command/base.rb:87:in `perform'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/command.rb:48:in `invoke'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/commands.rb:18:in `<top (required)>'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/engine/commands.rb:9:in `require'
from /home/gazayas/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/railties-7.0.3/lib/rails/engine/commands.rb:9:in `<top (required)>'
from bin/rails:14:in `require'
from bin/rails:14:in `<main>'
Hypothetically, when setting up a webhooks endpoint for scaffolding_completely_concrete_tangible_things.updated
, we want users to be able to specify that they only want to receive a webhook when a specific tangible thing is updated. The current plan is to implement this by adding a scaffolding_completely_concrete_tangible_thing_id
attribute to Webhooks::Outgoing::Endpoint
. (We're also going to add a scaffolding_absolutely_abstract_creative_concept_id
attribute as well, for filtering those kinds of events.)
Assume there is both a "Creative Concept" and "Tangible Thing" super select field on the form for Webhooks::Outgoing::Endpoint
.
Country
> Region
> City
.I think this should be relatively straightforward, since we have the ability to populate a Super Select based on an AJAX request and you can hit /account/scaffolding/absolutely_abstract/creative_concepts/$CREATIVE_CONCEPT_ID/completely_concrete/tangible_things.json
and get a list of Tangible Things for a given Creative Concept.
Can you successfully scaffold two trix_editor
fields onto the same model and have them both work? (Reported by @DavidColby.)
We need to make sure we can have more than one color picker instance per view.
On a super-select field that doesn't allow multiple selected elements, too many clicks are needed to enter text into the type-ahead text field.
It's especially noticeable on the Time Zone field during the sign-up process:
And seen in both GIFs above, clicking the field's <label>
does outline the field, but doesn't provide a way to start typing keys to narrow the selection as expected.
Looking at the following view as an example:
We need the option to specify that "Client Secret" and "Token" are secret and shouldn't be shown completely without user action. Basically we should present them as the first five characters and then a link to show the rest:
fDaLt
Show
There's a bug in isSelect2LoadedOnWindowJquery
. It's not returning the right result.
It affects the other two times this method is used, and it should check window.$.fn.select2
for availability.
Here's the output from bin/dev
:
09:23:02 web.1 | started with pid 68288
09:23:02 worker.1 | started with pid 68289
09:23:02 js.1 | started with pid 68290
09:23:02 light-js.1 | started with pid 68291
09:23:02 light-css.1 | started with pid 68292
09:23:02 light-js.1 | yarn run v1.22.17
09:23:02 js.1 | yarn run v1.22.17
09:23:03 light-js.1 | $ esbuild `bundle exec bin/theme javascript light` --bundle --sourcemap --outdir=app/assets/builds --loader:.png=file --loader:.jpg=file --watch
09:23:03 js.1 | $ node esbuild.config.js --watch
09:23:03 js.1 | ✘ [ERROR] Could not resolve "@bullet-train/fields/app/assets/javascripts/intl-tel-input-utils.js"
09:23:03 js.1 |
09:23:03 js.1 | app/javascript/intl-tel-input-utils.js:1:7:
09:23:03 js.1 | 1 │ import "@bullet-train/fields/app/assets/javascripts/intl-tel-input-...
09:23:03 js.1 | ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
09:23:03 js.1 |
09:23:03 js.1 | You can mark the path "@bullet-train/fields/app/assets/javascripts/intl-tel-input-utils.js" as external to exclude it from the bundle, which will remove this error.
09:23:03 js.1 |
09:23:03 js.1 | ▲ [WARNING] "@charset" must be the first rule in the file
09:23:03 js.1 |
09:23:03 js.1 | ../../asdf/local/bullet_train-fields/node_modules/trix/dist/trix.css:300:0:
09:23:03 js.1 | 300 │ @charset "UTF-8";
09:23:03 js.1 | ╵ ~~~~~~~~
09:23:03 js.1 |
09:23:03 js.1 | This rule cannot come before a "@charset" rule
09:23:03 js.1 |
09:23:03 js.1 | ../../asdf/local/bullet_train-fields/node_modules/trix/dist/trix.css:6:0:
09:23:03 js.1 | 6 │ trix-editor {
09:23:03 js.1 | ╵ ^
09:23:03 js.1 |
09:23:03 js.1 | resolveDir /Users/andrewculver/Sites/clean/bullet_train/app/javascript/controllers
09:23:03 js.1 | path ./**/*_controller.js
09:23:03 js.1 | error Command failed with exit code 1.
09:23:03 js.1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
09:23:03 light-js.1 | [watch] build finished, watching for changes...
09:23:04 js.1 | exited with code 1
09:23:04 system | sending SIGTERM to all processes
09:23:04 light-css.1 | terminated by SIGTERM
09:23:04 light-js.1 | exited with code 1
09:23:04 worker.1 | terminated by SIGTERM
09:23:04 web.1 | terminated by SIGTERM
Here are the steps to reproduce:
Steps to reproduce:
export IDE=code # or whatever command you use to open a project in your IDE from the terminal.
git clone [email protected]:bullet-train-co/bullet_train.git bullet_train
cd bullet_train
bin/develop
# Select number 3 and hit <Enter>.
Read all the output for context. Basically it automatically links up both the Ruby gem and the npm package to the checked out copy in local/bullet_train-fields
.
Open a new terminal:
bin/dev
That should exit with a failure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.