- Make
index.js
the main entry point
- Merge security updates from dependabot
- Disable browser autocomplete when autocomplete feature is disabled
- Add autocomplete setting to control autocomplete
- Fix bug where yarn output reported to stylesheet (#76)
- Update picked state when receiving a new picked value. This allows ArsArsenal to be controlled.
- Add failure state when data for an image can not be loaded
- Add clear button to selected state
- Updates to UI to support more compact usage
- Improved gallery focus styles
- Inlined icons
- Remove exit animation from gallery, which was resulting in an undesired visual effect where gallery items flickered into new results
- Fix case where searching broke pagination.
- Scroll resets upon search
- Safely handle duplicate record entries returned from API responses
- Add
logger
option to customize errors and warnings emitted from ArsArsenal - Add CSS flexbox fix to prevent a single row of gallery items from stretching to bottom of container.
- Fix an overflow bug in Chrome 72 where gallery items extended past container
- Remove incorrect border on search box in Safari
- Do not show ellipsis for nully text values
- Fix cases where truncated text broke operating on nully values
- New buttons are now typed as "button" to prevent form submission
In this release, we've made some updates to improve animations and have introduced the concept of tags.
Tags allow a user to quickly search by a particular term. They can click a tag to pre-populate search with the given tag.
Additionally, we've added a panel to the gallery view that allows a user to see more information about a picture without needing to go to the table view.
- Update dependencies
- Fixed React key issue where stale content could load along-side fresh content, resulting in a key error
This release adds pagination to ArsArsenal. In the process of doing this, we've made some breaking changes to the way URLs are constructed. For most users, this upgrade process should be minimal:
The old makeURL
option relied on a null check to determine if the requested url is for a list of items or a single record. To avoid that ambiguity, there are now two endpoints for URL construction:
Instead of:
function makeURL(url, id) {
if (id == null) {
return url
} else {
return `${url}/${id}`
}
}
ArsArsenal.render({ makeURL })
Change this to:
let listUrl = url => url
let showUrl = (url, id) => `${url}/${id}`
ArsArsenal.render({ listUrl, showUrl })
These are the default implementations of each option. We anticipate that this change affects very few users.
With pagination, ArsArsenal must now manage multiple query parameters. For improved ergonomics, ArsArsenal now builds the query string on behalf of the user. Instead of returning a string, return an object of key/value pairs:
Instead of:
function makeQuery(term) {
return `q=${term}`
}
ArsArsenal.render({ makeQuery })
Return an object:
const PAGE_SIZE = 10
function listQuery({ page, search, sort }) {
// Return your pagination/search query implementation:
let offset = page * PAGE_SIZE
let limit = offset + PAGE_SIZE
return { q: search, offset, limit, sort }
}
Adding pagination required us to remove client-side sorting. ArsArsenal can't know all of the records on your server, so sorting would cause a frustrating reordering of items as new data loads.
To enable sorting, take advantage of the sort
field in the
listQuery
method:
function listQuery({ page, search, sort }) {
// Assuming your API requires a call like:
// /photos?page=1&q=Dogs&sortKey=breed
return {
page: page,
q: search,
sortKey: sort
}
}
- Handle
null
in captions and titles
- Export project as CommonJS module for better support
- Visual updates based on testing in a few apps
- Fix bad method reference
- Fix another case where indexOf check failed on null selection in the TableView
- Fix case where indexOf check failed on null selection
- Fix a style issue with selection clearing on mobile
- Add the ability to what table columns display
- Added a table view
- Significant animation and aesthetic improvements
- Do not fetch when given a
NaN
slug
- Remove PropType to avoid unexpected warning in
- Upgrade react-focus-trap dependency
- Upgrade dependencies
- Remove peer dependency on React
- Remove deprecation warnings in React 15.x
- Important Update: This update makes breaking changes to support
React 0.14. ars-arsenal now takes advantage of
react-addons-css-transition-group
and utilizesreact-dom
for rendering.
-
Adds the ability to clear existing image selections.
-
Adds a
resource
option for customizing file type language. For changing the "Photos" reference in "Pick a photo" selection text:- Setting
resource
to "File" renders "Pick a file" - Setting
resource
to "Image" renders "Pick an image"
- Setting
-
Updates basic selection styles
- Centers the selection text, re-positions icons to reflect the loading state within the selection button.
- Adds "Loading" text while a selected image is fetching.
- Applies the "loaded" class to the image shortly after onload for image-to-image transitions.
- Adds an explicit
-webkit-transition
to workaround autoprefixr not generating-webkit-filter
as a transition property.
-
Resets
isLoaded
state when the image re-renders with a different src.
- Updated style
- Added multiselection option, see #14
- Fixed an issue with Picker
onExit
where "Cancel" clicks could bubble and immediately re-open the Picker dialog
- The style folder for ars-arsenal is now placed within
ars-arsenal/style
. For those on 0.3.0, you will need to change this path.