
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Well, OK. But I don't want people thinking we're robo-sexuals, so if anyone asks, you're my debugger.
-- Bender, Futurama
TellThem is a drop-in development aid for rails that puts a nice hovering box over any page which you want to provide debug information for.
Add this line to your application's Gemfile:
gem 'tell-them'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tell-them
You'll need to add a line into your layout (say in apps/views/layouts/application.html.erb) that will insert the necessary HTML, along with JS and CSS links (I've assumed that because this is development only, JS and CSS pipeline optimisation is probably unnecessary):
<%= TellThem.html %>
Once that's done, TellThem is ready to use!
Whenever you want to expose internal data from the controller to the developer in the webpage, just add it as one or more key:value pairs using a map:
TellThem.add(this: 'this is some data!', :'Become Admin' => '/become_admin?source=tell-them')
This data will now appear in a little pop-up box on the webpage. Note that the popup box will only appear if Rails.env.development? is true, and it will only appear if at some point in rendering of the page some data has been added with TellThem.add()
If the value of any item will parse as a URI, TellThem will wrap it in a link so that it's clickable.
If you would like TellThem to help you debug your breakpoints and responsive behaviour, it can do that too. Using an array of maps, you can enable a set of CSS-styled indicators to appear on the box. Supply a min
and/or max
selector to match your breakpoints, and a name
item that will display in the box header when the specified breakpoint is active. If you also add an initial
item the ? in the TellThem box will be replaced, so that you don't have to open or pin the box to see the current breakpoint.
TellThem.enable_media_queries([
{ initial: "M", name: 'mobile', max: '767px' },
{ initial: "T", name: 'tablet', min: '768px', max: '889px' },
{ initial: "S", name: 'screen', min: '890px', max: '1249px' },
{ initial: "W", name: 'wide', min: '1250px' },
])
If you would like TellThem to help you debug grid layout as well, you can add column count, width, and spacing to the media query block. It will add a "Grid" button to the controls to toggle grid visibility, or in non-js land the grid will always be visible.
TellThem.enable_media_queries([
{ initial: "M", name: 'mobile', max: '767px', columns: 1, margins: '20px' },
{ initial: "T", name: 'tablet', min: '768px', max: '889px', columns: 18, column_width: '20px', column_space: '15px' },
{ initial: "S", name: 'screen', min: '890px', max: '1249px', columns: 24, column_width: '20px', column_space: '15px' },
{ initial: "W", name: 'wide', min: '1250px', columns: 36, column_width: '20px', column_space: '15px' },
])
FAQs
Unknown package
We found that tell-them demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.