Skip to content

Commit

Permalink
Upgraded upgrade guide (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprats authored Feb 3, 2025
1 parent 5415a35 commit bbd4111
Showing 1 changed file with 2 additions and 81 deletions.
83 changes: 2 additions & 81 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
# Paradox

This first section is what Paradox most likely needs to update. The "Version 2 to Version 3" section is the full reference guide.

### NPM

Updates are still being made, so this command may need to be run again later

```
yarn upgrade traitify-widgets@alpha
```

### Auth

```
// Old
Traitify.setHost("https://api.traitify.com");
Traitify.setPubliCKey("Your Traitify public key");
// New
Traitify.http.authKey = "Your Traitify public key";
Traitify.http.host = "https://api.traitify.com";
```

### Component

```
// Old
assessment = traitify.ui.component();
assessment.assessmentID("an assessment id you have generated via a server side client");
assessment.target("#the-id-of-the-target-you-wish-to-render-to");
assessment.render();
// New
Traitify.options.assessmentID = "your-assessment-id";
Traitify.render("#the-id-of-the-target-you-wish-to-render-to");
```

When using a benchmark

```
Traitify.options.benchmarkID = "your-benchmark-id";
Traitify.options.profileID = "your-profile-id";
```

### Locale

```
// Old
assessment.locale("es-us");
Traitify.ui.setLocale("es-us");
// New
Traitify.options.locale = "es-us";
Traitify.updateLocale("es-us"); // Needed if widget is already rendered
```

### Report

```
// Old
assessment.perspective("thirdPerson");
assessment.view("manager");
// New
Traitify.options.report = "manager";
```

### Other

- Remove `.theme("paradox")`

# Version 2 to Version 3

## General
Expand All @@ -92,8 +20,6 @@ Traitify.options.report = "manager";

### CDN

##### NOTE: This change is not yet live

```
<!-- Old -->
<script src="https://cdn.traitify.com/js/v2/traitify.js"></script>
Expand All @@ -102,19 +28,14 @@ Traitify.options.report = "manager";
<script src="https://cdn.traitify.com/js/v3/traitify.js"></script>
```

### Installation

##### NOTE: This change is not yet live
### npm

```
npm i --save traitify-widgets@latest
npm i --save traitify-widgets@2 // To continue to use the old version
```

##### NOTE: This is the current workaround

```
npm i --save traitify-widgets@alpha
npm i --save traitify-widgets@latest // New version
```

## Usage
Expand Down

0 comments on commit bbd4111

Please sign in to comment.