Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0489baf
remove rulesRevamp beta.
Krishna2323 Aug 14, 2026
3e9d34b
fix knip check.
Krishna2323 Aug 16, 2026
3b1bbfd
Fix Workflows policy prop, drop dead titleKey, update rules-on-Collec…
Krishna2323 Aug 16, 2026
3ce69a2
Merge branch 'main' into krishna2323/remove-rules-revamp-beta
Krishna2323 Aug 17, 2026
e87f940
fix approval tab link.
Krishna2323 Aug 17, 2026
506fcdf
resolve conflicts.
Krishna2323 Aug 19, 2026
8954f4c
fix knip check.
Krishna2323 Aug 19, 2026
415204c
Remove dead code.
Krishna2323 Aug 19, 2026
b679daa
Don't require categories or tags when there are none to require
Krishna2323 Aug 20, 2026
b0a0f72
revert category toggle changes.
Krishna2323 Aug 20, 2026
c968598
merge main and resolve conflicts.
Krishna2323 Aug 20, 2026
70221f1
update translations.
Krishna2323 Aug 21, 2026
c1c6d0f
remove unused imports.
Krishna2323 Aug 21, 2026
e84c13d
remove unused import in DynamicWorkspaceViewTagsPage.
Krishna2323 Aug 21, 2026
a5afb17
Only clear the workflows tab param after this mount persisted it
Krishna2323 Aug 21, 2026
786a009
Remove dead code
Krishna2323 Aug 21, 2026
297d755
Delete the legacy Rules and Workflows pages
Krishna2323 Aug 21, 2026
276517c
merge main and resolve conflicts.
Krishna2323 Sep 10, 2026
b61792a
Delete the dead legacy SpendRulesSection component
Krishna2323 Sep 10, 2026
eef64e0
fix failing tests.
Krishna2323 Sep 10, 2026
00239ac
merge main and resolve conflicts.
Krishna2323 Sep 10, 2026
73013a0
Fix merge fallout: drop resurrected beta entry, restore approver hook…
Krishna2323 Sep 10, 2026
27bd036
Fix review feedback: French translation string, Collect bypassing car…
Krishna2323 Sep 10, 2026
56b92be
Trigger the Control upgrade page for card spend rules instead of hidi…
Krishna2323 Sep 10, 2026
f3b878c
Fix upgrade redirect to return to the card issuance wizard.
Krishna2323 Sep 10, 2026
48a5628
Merge remote-tracking branch 'upstream/main' into krishna2323/remove-…
Krishna2323 Sep 10, 2026
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
1 change: 0 additions & 1 deletion src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,6 @@ const CONST = {
DUALENTRY: 'dualEntry',
CAMPFIRE: 'campfire',
BUSINESS_CENTRAL: 'businessCentral',
RULES_REVAMP: 'rulesRevamp',
COMMUTER_EXCLUSIONS: 'commuterExclusions',
MULTIPLE_APPROVERS: 'multipleApprovers',
GLOBAL_REIMBURSEMENTS: 'globalReimbursements',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ type BuildWorkspaceNavigationItemsParams = {
/** Whether pending offline state should be considered by Workspace visibility rules. */
isOffline: boolean;

isRulesRevampBetaEnabled: boolean;
isVendorMatchingBetaEnabled: boolean;

/** Whether navigation should use the narrow-layout Workspace flow. */
Expand Down Expand Up @@ -271,7 +270,6 @@ function buildWorkspaceNavigationItems({
currentUserLogin,
icons,
isOffline,
isRulesRevampBetaEnabled,
isVendorMatchingBetaEnabled,
shouldUseNarrowLayout,
convertToDisplayString,
Expand All @@ -290,7 +288,6 @@ function buildWorkspaceNavigationItems({
currentUserLogin,
icons,
policyCategories: policyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policy.id}`],
isRulesRevampBetaEnabled,
isVendorMatchingBetaEnabled,
convertToDisplayString,
});
Expand Down Expand Up @@ -421,7 +418,6 @@ function useNavigationSuggestions(query: string, shouldWatchForApprovals = true)
currentUserLogin,
icons,
isOffline: !!isOffline,
isRulesRevampBetaEnabled: isBetaEnabled(CONST.BETAS.RULES_REVAMP),
isVendorMatchingBetaEnabled: isBetaEnabled(CONST.BETAS.VENDOR_MATCHING),
shouldUseNarrowLayout,
convertToDisplayString,
Expand Down
239 changes: 0 additions & 239 deletions src/components/SpendRules/SpendRulesSection.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ export default function WorkspaceTagsTableRow({
item.name,
tagCountSubtitle,
enabledStatusLabel,
item.showRequiredSwitch && item.required ? translate('common.required') : null,
shouldShowGLCodeColumn && item.glCode ? `${translate('workspace.tags.glCode')}: ${item.glCode}` : null,
shouldShowApproverColumn && item.approverDisplayName ? `${translate('common.approver')}: ${item.approverDisplayName}` : null,
]
.filter(Boolean)
.join(', ');

const switchValue = item.showRequiredSwitch ? !!item.required : item.enabled;
const switchAccessibilityLabel = item.showRequiredSwitch ? translate('workspace.tags.requiresTag') : translate('workspace.tags.enableTag');
const handleSwitchToggle = item.showRequiredSwitch ? item.onToggleRequired : item.onToggleEnabled;
const switchValue = item.enabled;
const switchAccessibilityLabel = translate('workspace.tags.enableTag');
const handleSwitchToggle = item.onToggleEnabled;
const isSwitchControlDisabled = !!item.disabled || !!item.isSwitchDisabled;

return (
Expand Down Expand Up @@ -155,7 +154,7 @@ export default function WorkspaceTagsTableRow({
</View>
)}

{(item.showEnabledSwitch || item.showRequiredSwitch) && !!handleSwitchToggle && (
{item.showEnabledSwitch && !!handleSwitchToggle && (
<View
style={[styles.justifyContentCenter, styles.alignItemsEnd]}
{...getCellAccessibilityProps(isTableSemanticsEnabled)}
Expand Down
20 changes: 0 additions & 20 deletions src/components/Tables/WorkspaceTagsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Table, {composeTableListHeader} from '@components/Table';
import type {TableEmptyStateProps} from '@components/Table/TableEmptyStates/TableEmptyState';

import useLocalize from '@hooks/useLocalize';
import usePermissions from '@hooks/usePermissions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';

Expand All @@ -12,7 +11,6 @@ import type {AvatarSource} from '@libs/UserAvatarUtils';

import variables from '@styles/variables';

import CONST from '@src/CONST';
import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';

import type {ListRenderItemInfo} from '@shopify/flash-list';
Expand Down Expand Up @@ -42,10 +40,8 @@ type WorkspaceTagTableRowData = TableData & {
isLocked: boolean;
isSwitchDisabled?: boolean;
showEnabledSwitch: boolean;
showRequiredSwitch: boolean;
action: () => void;
onToggleEnabled?: (enabled: boolean) => void;
onToggleRequired?: (required: boolean) => void;
onClose: () => void;
};

Expand Down Expand Up @@ -77,13 +73,10 @@ export default function WorkspaceTagsTable({
const styles = useThemeStyles();
const {translate, localeCompare} = useLocalize();
const {shouldUseNarrowLayout, isMediumScreenWidth} = useResponsiveLayout();
const {isBetaEnabled} = usePermissions();

const shouldUseNarrowTableLayout = shouldUseNarrowLayout || isMediumScreenWidth;
const shouldShowTagCountColumn = isMultiLevelTags && !shouldUseNarrowTableLayout;
const shouldShowEnabledColumn = !isMultiLevelTags;
// Required is configured from Rules once the revamp is on, so the rows have no switch to head.
const shouldShowRequiredColumn = isMultiLevelTags && !hasDependentTags && !isBetaEnabled(CONST.BETAS.RULES_REVAMP);

const tagTableColumns: Array<TableColumn<WorkspaceTagTableColumnKey>> = [
{
Expand Down Expand Up @@ -132,19 +125,6 @@ export default function WorkspaceTagsTable({
},
]
: []),
...(shouldShowRequiredColumn
? [
{
key: 'required' as const,
label: translate('common.required'),
sortable: true,
width: variables.tableSwitchColumnWidth,
styling: {
containerStyles: [styles.justifyContentEnd],
},
},
]
: []),
{
key: 'actions',
label: '',
Expand Down
4 changes: 1 addition & 3 deletions src/hooks/useControlOnlyRuleUpgradeRedirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import ROUTES from '@src/ROUTES';
import {useEffect, useRef} from 'react';

import useOnyx from './useOnyx';
import usePermissions from './usePermissions';
import usePolicy from './usePolicy';

/**
Expand All @@ -24,13 +23,12 @@ import usePolicy from './usePolicy';
*/
function useControlOnlyRuleUpgradeRedirect(policyID: string, backTo?: Route) {
const policy = usePolicy(policyID);
const {isBetaEnabled} = usePermissions();
const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`);

const isCollect = isCollectPolicy(policy);
// Mirrors the feature check in AccessOrNotFoundWrapper. When Rules itself is disabled, that wrapper already
// redirects to More features, so redirecting to the upgrade page too would flash it on the way there.
const isRulesFeatureEnabled = arePolicyRulesEnabled(policy, policyCategories, isBetaEnabled(CONST.BETAS.RULES_REVAMP));
const isRulesFeatureEnabled = arePolicyRulesEnabled(policy, policyCategories);
const hasRedirectedToUpgrade = useRef(false);
const upgradeBackTo = backTo ?? ROUTES.WORKSPACE_RULES.getRoute(policyID);

Expand Down
Loading
Loading