Navigation Menu

Skip to content

Commit

Permalink
Preserve property order in environment editor (#1497)
Browse files Browse the repository at this point in the history
* Add json-order package

* Add propertyMap and sort properties boolean to model

* Keep property order

* Remove extra check

* Allow env editor in request group overrides to maintain order

* Add checkbox

* Order control added

* Use up to date json-order

* Rename

* Remove extra field

* Update separator

* Prevent unnecessary parse

* Move to regular dependency

* add to packedDeps

* Renames

* Remove extra code

* Removed extra state

* More fixes...

* add flowtypes for json-order

* typo

* Updated flowtypes

* Fixed?

* linting to remove unused import
  • Loading branch information
develohpanda authored and gschier committed May 29, 2019
1 parent 5175515 commit 24a2e75
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 81 deletions.
92 changes: 67 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/insomnia-app/app/models/environment.js
Expand Up @@ -13,6 +13,7 @@ export const canSync = true;
type BaseEnvironment = {
name: string,
data: Object,
dataPropertyOrder: Object | null,
color: string | null,
metaSortKey: number,

Expand All @@ -26,6 +27,7 @@ export function init() {
return {
name: 'New Environment',
data: {},
dataPropertyOrder: null,
color: null,
isPrivate: false,
metaSortKey: Date.now(),
Expand Down
2 changes: 2 additions & 0 deletions packages/insomnia-app/app/models/request-group.js
Expand Up @@ -12,6 +12,7 @@ type BaseRequestGroup = {
name: string,
description: string,
environment: Object,
environmentPropertyOrder: Object | null,
metaSortKey: number,
};

Expand All @@ -22,6 +23,7 @@ export function init() {
name: 'New Folder',
description: '',
environment: {},
environmentPropertyOrder: null,
metaSortKey: -1 * Date.now(),
};
}
Expand Down

0 comments on commit 24a2e75

Please sign in to comment.