Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable RTE by default #169

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ Dropping a requirement of a major version of a dependency is a new contract.
## [Unreleased]
[Unreleased]: https://github.com/atlassian/jira-actions/compare/release-3.27.0...master

### Added
- Split `SetUpAction` into `DisableRichTextEditor` and `HideHealthNotifications`.

### Deprecated
- Deprecate `SetUpAction` and `SET_UP`. It's too vague to interpret and track performance changes.
Use specific UXes instead, like `DisableRichTextEditor` or `HideHealthNotifications`.

### Fixed
- Stop disabling Rich Text Editor by default in `Scenario`. RTE is supported since [3.5.0].

## [3.27.0] - 2023-01-12
[3.27.0]: https://github.com/atlassian/jira-actions/compare/release-3.26.0...release-3.27.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import com.atlassian.performance.tools.jiraactions.api.SeededRandom;
import com.atlassian.performance.tools.jiraactions.api.WebJira;
import com.atlassian.performance.tools.jiraactions.api.action.Action;
import com.atlassian.performance.tools.jiraactions.api.action.LogInAction;
import com.atlassian.performance.tools.jiraactions.api.action.SetUpAction;
import com.atlassian.performance.tools.jiraactions.api.action.*;
import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter;
import com.atlassian.performance.tools.jiraactions.api.memories.UserMemory;

Expand Down Expand Up @@ -39,6 +37,6 @@ default Action getLogInAction(WebJira jira, ActionMeter meter, UserMemory userMe
* @param meter Measures setup action.
*/
default Action getSetupAction(WebJira jira, ActionMeter meter) {
return new SetUpAction(jira, meter);
return new HideHealthNotifications(jira, meter);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ data class ActionType<out T>(
@JvmField val VIEW_DASHBOARD = ActionType("View Dashboard") { Unit }
@JvmField val VIEW_BOARD = ActionType("View Board") { IssuesOnBoard(it) }
@JvmField val LOG_IN = ActionType("Log In") { Unit }
@Deprecated("Use [HIDE_HEALTH_NOTIFICATIONS] and/or [DISABLE_RICH_TEXT_EDITOR] for fine-grained measurement. When you hear 'Set Up' takes 20 seconds, it's not clear what is really involved or what the UX is.")
@JvmField val SET_UP = ActionType("Set Up") { Unit }
@JvmField val DISABLE_RICH_TEXT_EDITOR = ActionType("Disable Rich Text Editor") { Unit }
@JvmField val HIDE_HEALTH_NOTIFICATIONS = ActionType("Hide Instance Health Notifications") { Unit }
dagguh marked this conversation as resolved.
Show resolved Hide resolved
@JvmField val VIEW_COMMENT = ActionType("View Comment") { Unit }
@JvmField val VIEW_HISTORY_TAB = ActionType("View History Tab") { IssueObservation(it) }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.atlassian.performance.tools.jiraactions.api.action

import com.atlassian.performance.tools.jiraactions.api.DISABLE_RICH_TEXT_EDITOR
import com.atlassian.performance.tools.jiraactions.api.WebJira
import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter

class DisableRichTextEditor(
private val jira: WebJira,
private val meter: ActionMeter
) : Action {
override fun run() {
meter.measure(DISABLE_RICH_TEXT_EDITOR) {
jira.configureRichTextEditor().disable()
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.atlassian.performance.tools.jiraactions.api.action

import com.atlassian.performance.tools.jiraactions.api.HIDE_HEALTH_NOTIFICATIONS
import com.atlassian.performance.tools.jiraactions.api.WebJira
import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter

class HideHealthNotifications(
private val jira: WebJira,
private val meter: ActionMeter
) : Action {
override fun run() {
meter.measure(HIDE_HEALTH_NOTIFICATIONS) {
val systemAdministrationPage = jira.administrate().system()
jira.accessAdmin().runWithAccess {
systemAdministrationPage
.troubleshootingAndSupportTools()
.instanceHealth()
.notifications()
.dontShowAny()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@ import com.atlassian.performance.tools.jiraactions.api.SET_UP
import com.atlassian.performance.tools.jiraactions.api.WebJira
import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter

@Deprecated("Use [HideHealthNotifications] and/or [DisableRichTextEditor] for fine-grained control and measurements")
class SetUpAction(
private val jira: WebJira,
private val meter: ActionMeter
) : Action {

override fun run() {
meter.measure(SET_UP) {
jira.configureRichTextEditor().disable()
val systemAdministrationPage = jira.administrate().system()
jira.accessAdmin().runWithAccess {
systemAdministrationPage
.troubleshootingAndSupportTools()
.instanceHealth()
.notifications()
.dontShowAny()
}
DisableRichTextEditor(jira, meter).run()
dagguh marked this conversation as resolved.
Show resolved Hide resolved
HideHealthNotifications(jira, meter).run()
}
}
}
Loading