Socket
Book a DemoInstallSign in
Socket

@superblocks-at/devtools

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superblocks-at/devtools

Airtable block dev tools that include a global config editor and an api explorer

latest
Source
npmnpm
Version
0.9.8
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

@superblocks-at/devtools

Airtable blocks dev tools - an npm package that can be added to any block and includes the following tools:

  • A GlobalConfig editor - so you can view AND edit global config in development mode AND in release mode.

  • A blocks api explorer - with support for viewing the property values of the following models, exactly as you get them from the api:

  • Base
  • Active table
  • Active view
  • Selected record
  • Selected field
  • Cursor
  • Session
  • Viewport

Installation

In your custom block folder:

npm install @superblocks-at/devtools --save

Usage

import React from "react";
import { initializeBlock } from "@airtable/blocks/ui";

import { Devtools } from "@superblocks-at/devtools";

function BlockWithDevtools {
	// Wrap Devtools around your block code or put it wherever you want in your main component.
	// It will just work.
	return <Devtools>
		<MyBlock/>
	</Devtools>;

	// Another way of using Devtools
	// return <>
		// <Devtools/>
		// <MyBlock/>
	// </>;
}

initializeBlock(() => <BlockWithDevtools />);

To open and close devtools, press 'ddd' quick 3 times.

Devtools options / props

import { Devtools, Position} from "@superblocks-at/devtools";


<Devtools
  shortcutKey="d",
  timeout={500},
  position ={Position.bottom},
  overlap={100}
/>
Prop nameDescriptionDefault value
shortcutKeyThe key to press 3 times to open/close devtools"d"
timeoutThe max period between keystrokes in milliseconds before keystroke count is reset500
positionWhere to display devtools: bottom, left, top or rightPosition.bottom
overlapHow much of the block width or height the devtools ui overlaps100 (percent)

LICENSE

MIT

Contributions

Are more than welcome. The goal is to have the community expand the package with additional tools that can increase the productivity of Airtable custom blocks developers. Some ideas that come to mind:

  • Add Links to the relevant blocks api documentation section wherever appropriate.
  • Add the ability to execute api functions which also shows correct usage through pre-populated code snippets.

Development environment setup instructions for contributors

See the devtools-dev-env repo for instructions.

FAQs

Package last updated on 27 Jul 2020

Did you know?

Socket

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.

Install

Related posts