Releases: darrenburns/posting
2.3.0 - Live theme editing
If Posting is using a theme, and you edit that theme on disk, the UI will now instantly update to reflect that change.
posting-style-hot-reloading.mp4
This release also updates Textual to 0.86.2, and makes some minor adjustments to the default theme (galaxy).
Full Changelog: 2.2.0...2.3.0
2.2.0 - Theme system revamp
This release upgrades the theme system, introduces 15 new themes, makes syntax highlighting automatically adapt to the theme, and lots more!
There's also a new keybindings panel (thanks, Textual!), which updates based on the widget that has focus in the UI:
Added
- Added 15 new themes (4 specific to Posting, 11 inherited from Textual's new theme system).
- Themes are now in submenu of command palette.
- Keybinding assistant can now be displayed as a sidebar, teaching you keybindings as you go.
- New tooltips when hovering over collection browser keybinds in the app footer.
Changed
- Syntax highlighting colours now derive automatically from the current theme.
- URL bar highlighting now derives automatically from the current theme.
- Method colour-coding in the collection browser is now derived automatically from the current theme.
- Jump mode UI has been refined to be more readable.
- Various refinements to existing themes.
- Options and descriptions in command palette reworded and reordered for clarity.
- Updated to Textual 0.86.1.
Full Changelog: 2.1.1...2.2.0
2.1.1
Fixed
- Fix collection browser message not being visible when it's empty.
Changed
- Improved message in empty collection browser, indicating keybind for how to toggle the collection browser.
Full Changelog: 2.1.0...2.1.1
2.1.0 - Import curl commands
With Posting 2.1, you can now import curl commands by pasting them into the URL bar.
posting-curl-command-paste.mp4
Added
- Import curl command by pasting it into the URL bar.
Changed
- Collection browser width now adjusts based on content, so it doesn't waste a lot of space on larger screens.
- Info tab now shows "Request not saved to disk" if a request has not been saved to disk, rather than "None" or nothing at all.
What's Changed
- Add curl import functionality by @MikeBellika in #123
- Some UI fixes by @darrenburns in #129
New Contributors
- @MikeBellika made their first contribution in #123
Full Changelog: 2.0.1...2.1.0
2.0.1
What's Changed
Fixes a performance regression and some visual issues.
- Bump Textual version by @darrenburns in #119
Full Changelog: 2.0.0...2.0.1
2.0.0 - Scripting and keymaps
Posting is a powerful HTTP client that runs entirely inside your terminal.
Version 2.0 has just arrived, bringing some powerful new features to Posting, including scripting, keymaps, and more!
Pre-request and post-response scripts
A common feature request has been around adding scripting capabilities to Posting.
With 2.0, you can now attach Python functions to requests, and have them run before or after the request is sent.
All output from these scripts is captured and displayed in the new "Scripts" tab.
This makes it easy to see the results of your script executions and troubleshoot any issues.
This is an extremely versatile feature.
You can use scripts to perform setup, set variables which requests and other scripts can access, modify outgoing requests, and much more.
Here's an example of some Python code which you can attach to a request:
def on_request(request: RequestModel, posting: Posting) -> None:
request.headers.append(Header(name="X-Custom-Header", value="foo"))
request.auth = Auth.basic_auth("username", "password")
print("Request is being sent!")
posting.notify("Request is being sent!")
The API is currently a bit rough around the edges, but it'll be improved in future releases.
Attached scripts can even be edited in an external editor, and Posting will automatically reload them when they are changed.
There's also a convenience keyboard shortcut which allows you to quickly open a request's scripts in your preferred $EDITOR
,
so you could quickly swap over to vim
or nano
to make changes, then return to Posting to continue working.
Check out the scripting docs for more details!
Keymaps
Posting 2.0 also allows you to declare custom keybindings, thanks to an update in the underlying Textual framework.
For 2.0 only "global" keybindings can be remapped, but this will be expanded in future releases to include most keybindings.
You can customise your keymap by adding a keymap
section to your Posting config.
Here's a short example which changes the default for sending the request to ctrl+r
:
keymap:
send-request: "ctrl+r"
Hopefully this will help you feel more at home in Posting, and avoid awkward clashes with emulators and multiplexers!
See the keymap docs for more details!
Customisable hostnames
Posting is a TUI, which means it works great over SSH.
However, when working inside a TUI, it's sometimes easy to forget which host you're on.
In 2.0, there's a new config option which allows you to customise the hostnames which are displayed in the header, including styling them with Rich markup to make them stand out.
This is useful if you work with Posting in multiple environments, such as your local machine, a staging server, and a production server.
Here's the config I use on my "production" server to achieve the effect above:
heading:
hostname: "[black on #ff0000 bold blink]PRODUCTION[/]"
Documentation
Posting's documentation has been expanded, making it easier than ever to get started!
The additions include:
- Duplicating and "quick duplicating" requests.
- Scripting.
- Keymaps.
- Integrating Posting with external tools.
- An improved getting started guide which better showcases some quality-of-life features that may not be obvious at first glance :)
Auto-focus
Posting has several config options for automatically switching focus on certain events.
There's a new one for switching focus when a request is opened: focus.on_request_open
!
What's next?
Textual 1.0 is around the corner, and will unlock a better theming system for Posting as well as a more powerful command palette!
I've also braindumped some features I'd like to implement in Posting here.
The new features mentioned in this post and those on the roadmap are very much driven by users.
If you'd like to suggest new features, please open a discussion on GitHub!
Known issues
- There's a performance regression with entering jump mode and opening the command palette. This will be fixed in an upcoming release. You may wish to stay on 1.13.0 for now if you're on a slower machine and finding the delay irritating!
1.13.0
What's Changed
With this release, Posting will watch loaded environment files and refresh the UI to reflect changes in them. There's some new config for hiding the collection browser on startup too, and a bunch of smaller changes. See the log below for more info.
Added
- New
collection_browser.show_on_startup
config to control whether the collection browser is shown on startup. - Watch for changes to loaded dotenv files and reload UI elements that depend on them when they change.
Changed
- Upgraded all dependencies.
- Remove
pydantic-settings
crash workaround on empty config files. - Renaming
App.maximized
as it now clashes with a Textual concept. - Removed "using default collection" message from startup.
Fixed
- Fixed crash while rendering error message on timeout.
Full Changelog: 1.12.3...1.13.0
1.12.3
What's Changed
- Upgrade textual by @darrenburns in #94
- Catch possible pyperclip exception if no clipboard mechanism installed by @seapagan in #98
New Contributors
Full Changelog: 1.12.1...1.12.3
Note: 1.12.2 was yanked. It's equivalent to 1.12.1.
1.12.1
Fixed
- Fix "invalid escape sequence" warnings on Python 3.12+
- Fix buttons in request deletion confirmation modal not being usable with the enter key.
Full Changelog: 1.12.0...1.12.1
1.12.0
Added
- Methods in the collection browser (sidebar) are now coloured.
- Add (work-in-progress) Guide: https://posting.sh/guide/
Full Changelog: 1.11.0...1.12.0