Skip to content

refactor(resin): Move iscurrent and fileid to BaseManager#642

Merged
ConradJChan merged 5 commits intobox:masterfrom
ConradJChan:move-resin-tag
Dec 2, 2020
Merged

refactor(resin): Move iscurrent and fileid to BaseManager#642
ConradJChan merged 5 commits intobox:masterfrom
ConradJChan:move-resin-tag

Conversation

@ConradJChan
Copy link
Contributor

@ConradJChan ConradJChan commented Dec 1, 2020

Since resin tags are picked up based on DOM hierarchy, this change moves them into the BaseManager which is the highest DOM element that Annotations controls.

TODO:

  • unit tests

@ConradJChan ConradJChan requested a review from a team as a code owner December 1, 2020 19:06
@ConradJChan ConradJChan changed the title refactor(resin): Move iscurrent to BaseManager refactor(resin): Move iscurrent and fileid to BaseManager Dec 2, 2020
@mingzexiao6
Copy link
Contributor

You need to change the first commit message in order to change the merged commit title. Changing the PR title doesn't work.

mingzexiao6
mingzexiao6 previously approved these changes Dec 2, 2020
}

getManagers(parentEl: HTMLElement, referenceEl: HTMLElement): Set<Manager> {
const isCurrentFileVersion = getIsCurrentFileVersion(this.store.getState());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this all work correctly if these store values change outside of the getManagers flow? Should we introduce something like the BaseManager style method that gets called when these values change in the store?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's unnecessary at this point. If the fileid or iscurrent properties change, a new preview is triggered and annotations is reinstantiated. If at a later point we introduce a field that can change on the fly here then we'd need to solve that problem

jstoffan
jstoffan previously approved these changes Dec 2, 2020
@ConradJChan ConradJChan merged commit 907e14b into box:master Dec 2, 2020
@ConradJChan ConradJChan deleted the move-resin-tag branch December 2, 2020 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants