Skip to content

Commit

Permalink
Merge pull request #10 from Ilhasoft/revert-9-update/1.16.1
Browse files Browse the repository at this point in the history
Revert "Update/1.16.1"
  • Loading branch information
Sandro-Meireles authored Jan 27, 2022
2 parents b55f28f + d1b43e0 commit 0eaf07d
Show file tree
Hide file tree
Showing 26 changed files with 260 additions and 373 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ report.html
lambda-build
lib
build
deploy
fabric
fabfile.py
25 changes: 0 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,6 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.16.1](https://github.com/nyaruka/floweditor/compare/v1.16.0...v1.16.1)

> 5 January 2022
- Don't link up the contact in recents when simulating [`#1031`](https://github.com/nyaruka/floweditor/pull/1031)
- Fix test snapshot [`608124a`](https://github.com/nyaruka/floweditor/commit/608124a29e26557bc4b323b582728fb84baaa0df)

#### [v1.16.0](https://github.com/nyaruka/floweditor/compare/v1.15.2...v1.16.0)

> 5 January 2022
- Recent contacts updated [`#1030`](https://github.com/nyaruka/floweditor/pull/1030)
- Fix showing media drawer in simulator for waits with hints [`#1029`](https://github.com/nyaruka/floweditor/pull/1029)
- Simulator should use wait events rather than the wait object [`#1027`](https://github.com/nyaruka/floweditor/pull/1027)
- Replace recent messages rollover with recent contacts using segment data from sprint [`533bc0c`](https://github.com/nyaruka/floweditor/commit/533bc0ca066aded845b958a6b7e8c0f73220152e)
- Make recent contacts clickable. [`ff5c8e2`](https://github.com/nyaruka/floweditor/commit/ff5c8e2ac52ccdc010b12b1134142d0614df0344)
- Improve Recent Contacts appearance [`fe47628`](https://github.com/nyaruka/floweditor/commit/fe4762865223837fd13c5067386395f3a72332b5)

#### [v1.15.2](https://github.com/nyaruka/floweditor/compare/v1.15.1...v1.15.2)

> 18 November 2021
- Use child.status rather than child.run.status [`#1024`](https://github.com/nyaruka/floweditor/pull/1024)

#### [v1.15.1](https://github.com/nyaruka/floweditor/compare/v1.15.0...v1.15.1)

> 9 November 2021
Expand All @@ -37,7 +13,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Bump ws from 5.2.2 to 5.2.3 [`#1021`](https://github.com/nyaruka/floweditor/pull/1021)
- Bump path-parse from 1.0.6 to 1.0.7 [`#1020`](https://github.com/nyaruka/floweditor/pull/1020)
- Bump tmpl from 1.0.4 to 1.0.5 [`#1019`](https://github.com/nyaruka/floweditor/pull/1019)
- Use child.status rather than child.run.status [`60ebf6e`](https://github.com/nyaruka/floweditor/commit/60ebf6e708fddd230c7371a91e9629935477dad3)

#### [v1.15.0](https://github.com/nyaruka/floweditor/compare/v1.14.4...v1.15.0)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nyaruka/flow-editor",
"license": "AGPL-3.0",
"repository": "git://github.com/nyaruka/floweditor.git",
"version": "1.16.1",
"version": "1.15.1",
"description": "'Standalone flow editing tool designed for use within the RapidPro suite of messaging tools but can be adopted for use outside of that ecosystem.'",
"browser": "umd/flow-editor.min.js",
"unpkg": "umd/flow-editor.min.js",
Expand Down
1 change: 0 additions & 1 deletion src/components/counter/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default class Counter extends React.Component<CounterProps> {
private handleMouseEvent(event: React.MouseEvent<HTMLDivElement>, callback: () => void): void {
event.preventDefault();
event.stopPropagation();

if (callback) {
callback();
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/flow/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ export class Flow extends React.PureComponent<FlowStoreProps, {}> {
onUpdatePositions={this.props.onUpdateCanvasPositions}
onLoaded={this.handleCanvasLoaded}
></Canvas>
<div id="activity_recent_contacts"></div>
<div id="activity_recent_messages"></div>
</div>
);
}
Expand Down
27 changes: 10 additions & 17 deletions src/components/flow/exit/Exit.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,15 @@
}
}

.recent_contacts {
.recent_messages {
width: 200px;
margin-top: -15px;
margin-top: 12px;
margin-left: -100px;
z-index: $z_recent_contacts;
z-index: $z_recent_messages;

background: transparent;

.container {
box-shadow: 0px 1px 3px 1px rgba(130, 130, 130, 0.2);
border-radius: $curvature;
background: $light_gray_2;
}
background: $light_gray_2;
border-radius: $curvature;
box-shadow: 0px 1px 3px 1px rgba(130, 130, 130, 0.2);

&.no_recents {
.title {
Expand All @@ -163,17 +159,14 @@
text-align: center;
}

.row {
.message {
text-align: left;
padding: 8px 10px;
border-top: 1px solid $light_gray;

.operand {
padding-top: 3px;
font-size: 12px;
.text {
font-size: 13px;
}

.time {
.sent {
padding-top: 3px;
font-size: 10px;
}
Expand Down
42 changes: 13 additions & 29 deletions src/components/flow/exit/Exit.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const categories = [{ uuid: createUUID(), name: 'Red', exit_uuid: exit.uuid }];
const exitProps: ExitProps = {
exit,
categories,
recentContacts: [],
recentMessages: [],
node: { uuid: createUUID(), actions: [], exits: [] },
showDragHelper: false,
translating: false,
Expand Down Expand Up @@ -42,17 +42,9 @@ describe(ExitComp.name, () => {
<>
<ExitComp
{...exitProps}
recentContacts={[
{
contact: { uuid: 'eaea6433-d423-41dd-94a9-075de20f322d', name: 'Jim' },
operand: 'Hi Mom!',
time: new Date().toUTCString()
},
{
contact: { uuid: 'f781f594-af8b-4493-b67c-2421bf2d4625', name: 'Bob' },
operand: 'Hi Dad!',
time: new Date().toUTCString()
}
recentMessages={[
{ text: 'Hi Mom!', sent: new Date().toUTCString() },
{ text: 'Hi Dad!', sent: new Date().toUTCString() }
]}
/>
</>
Expand All @@ -61,29 +53,21 @@ describe(ExitComp.name, () => {
// give our portal a chance to mount
jest.runAllTimers();

// we have activity but we can't see our recent contacts yet
// we have activity but we can't see our recent messages yet
getByText('1,000');
expect(baseElement).toMatchSnapshot(baseElement);
});

it('shows recent contacts on mouse over', () => {
it('shows recent messages on mouse over', () => {
const { baseElement, getByText, queryAllByText } = render(
<>
<div id="activity_recent_contacts"></div>
<div id="activity_recent_messages"></div>

<ExitComp
{...exitProps}
recentContacts={[
{
contact: { uuid: 'eaea6433-d423-41dd-94a9-075de20f322d', name: 'Jim' },
operand: 'Hi Mom!',
time: new Date().toUTCString()
},
{
contact: { uuid: 'f781f594-af8b-4493-b67c-2421bf2d4625', name: 'Bob' },
operand: 'Hi Dad!',
time: new Date().toUTCString()
}
recentMessages={[
{ text: 'Hi Mom!', sent: new Date().toUTCString() },
{ text: 'Hi Dad!', sent: new Date().toUTCString() }
]}
/>
</>
Expand All @@ -92,14 +76,14 @@ describe(ExitComp.name, () => {
// give our portal a chance to mount
jest.runAllTimers();

// now we need to mouse over our activity to see recent contacts
// now we need to mouse over our activity to see recent messages
const activity = getByText('1,000');
expect(queryAllByText('Recent Contacts').length).toEqual(0);
expect(queryAllByText('Recent Messages').length).toEqual(0);

fireEvent.mouseEnter(activity);
jest.runAllTimers();

expect(queryAllByText('Recent Contacts').length).toEqual(1);
expect(queryAllByText('Recent Messages').length).toEqual(1);
getByText('Hi Mom!');
getByText('Hi Dad!');
expect(baseElement).toMatchSnapshot();
Expand Down
Loading

0 comments on commit 0eaf07d

Please sign in to comment.