Skip to content

Commit

Permalink
Fix import from active sprints (#16)
Browse files Browse the repository at this point in the history
* Fix import from active sprints

* Bump version
  • Loading branch information
rocketmo authored Apr 8, 2024
1 parent 74cef4c commit bd353f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "standup",
"version": "1.2.2",
"version": "1.2.3",
"description": "A chrome extension to help facilitate standup meetings.",
"scripts": {
"build": "webpack --config webpack.config.js",
Expand Down
15 changes: 9 additions & 6 deletions src/components/persons-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { getPersonIndex } from '../../util';
import type { Person } from '../../util/types';
import './index.scss';

const UNASSIGNED = 'Unassigned';

interface PersonsListProps {
activePersonId?: string;
persons: Person[];
Expand Down Expand Up @@ -304,11 +306,11 @@ export default function PersonsList(props: PersonsListProps) {
const getEmptyMessage = () => {
const onImportClick = () => {
const avatarSelector =
"label[data-test-id='filters.ui.filters.assignee.stateless.avatar.assignee-filter-avatar'] img";
"label[data-test-id='filters.ui.filters.assignee.stateless.avatar.assignee-filter-avatar'] [role='img'] [hidden]";
const assignees = document.querySelectorAll(avatarSelector);
assignees.forEach((assignee) => {
const assigneeName = assignee.getAttribute('alt');
if (assigneeName) props.onAddPerson(assigneeName);
const assigneeName = assignee.textContent;
if (assigneeName && assigneeName !== UNASSIGNED) props.onAddPerson(assigneeName);
});

const showMore = document.querySelector<HTMLElement>(
Expand All @@ -318,12 +320,13 @@ export default function PersonsList(props: PersonsListProps) {

showMore.click();

const otherSelector = ".atlaskit-portal-container button[role='menuitemcheckbox'] img";
const otherSelector =
".atlaskit-portal-container button[role='menuitemcheckbox'] [role='img'] [hidden]";
const otherAssignees = document.querySelectorAll(otherSelector);

for (let index = 0; index < otherAssignees.length; index++) {
const assigneeName = otherAssignees[index].getAttribute('alt');
if (assigneeName) props.onAddPerson(assigneeName);
const assigneeName = otherAssignees[index].textContent;
if (assigneeName && assigneeName !== UNASSIGNED) props.onAddPerson(assigneeName);
}
showMore.click();
};
Expand Down

0 comments on commit bd353f8

Please sign in to comment.